1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-23 00:54:28 +00:00

fix double 'push tag' action feed (#15078)

Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
a1012112796 2021-03-21 18:11:22 +08:00 committed by GitHub
parent 2f0eb9fd5d
commit 17731e05ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -332,7 +332,8 @@ func (a *actionNotifier) NotifyPushCommits(pusher *models.User, repo *models.Rep
func (a *actionNotifier) NotifyCreateRef(doer *models.User, repo *models.Repository, refType, refFullName string) {
opType := models.ActionCommitRepo
if refType == "tag" {
opType = models.ActionPushTag
// has sent same action in `NotifyPushCommits`, so skip it.
return
}
if err := models.NotifyWatchers(&models.Action{
ActUserID: doer.ID,
@ -350,7 +351,8 @@ func (a *actionNotifier) NotifyCreateRef(doer *models.User, repo *models.Reposit
func (a *actionNotifier) NotifyDeleteRef(doer *models.User, repo *models.Repository, refType, refFullName string) {
opType := models.ActionDeleteBranch
if refType == "tag" {
opType = models.ActionDeleteTag
// has sent same action in `NotifyPushCommits`, so skip it.
return
}
if err := models.NotifyWatchers(&models.Action{
ActUserID: doer.ID,