diff options
author | a1012112796 <1012112796@qq.com> | 2021-03-21 18:11:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-21 11:11:22 +0100 |
commit | 17731e05ff47c72013fb52d1fc2236b4d7da269b (patch) | |
tree | ef6705a0b7f0d97dd958762ed3962622f48fb13d /modules | |
parent | 2f0eb9fd5d95fbb023676f0644b2174f0feff3ad (diff) | |
download | gitea-17731e05ff47c72013fb52d1fc2236b4d7da269b.tar.gz gitea-17731e05ff47c72013fb52d1fc2236b4d7da269b.zip |
fix double 'push tag' action feed (#15078)
Signed-off-by: a1012112796 <1012112796@qq.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/notification/action/action.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/notification/action/action.go b/modules/notification/action/action.go index 3530e48b1c..776bee6a0c 100644 --- a/modules/notification/action/action.go +++ b/modules/notification/action/action.go @@ -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, |