summaryrefslogtreecommitdiffstats
path: root/models/issue_comment.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-05-21 10:28:29 +0800
committerGitHub <noreply@github.com>2018-05-21 10:28:29 +0800
commit6bdc556b7f490be7360104b731ce817050cc1d80 (patch)
tree63887addb45b5b2be1e672580c984497fa9f4112 /models/issue_comment.go
parentdc0ef38950ec8aca78f6e870fb83d1ca68074682 (diff)
downloadgitea-6bdc556b7f490be7360104b731ce817050cc1d80.tar.gz
gitea-6bdc556b7f490be7360104b731ce817050cc1d80.zip
Fix some webhooks bugs (#3981)
* fix some webhooks bugs * update vendor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * fix test * fix clearlabels * fix pullrequest webhook bug fix #3492 * update release webhook description * remove unused code * fix push webhook in pull request * small changes
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r--models/issue_comment.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index ad200934bc..a829c80663 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -612,6 +612,8 @@ func CreateIssueComment(doer *User, repo *Repository, issue *Issue, content stri
Sender: doer.APIFormat(),
}); err != nil {
log.Error(2, "PrepareWebhooks [comment_id: %d]: %v", comment.ID, err)
+ } else {
+ go HookQueue.Add(repo.ID)
}
return comment, nil
}
@@ -754,6 +756,8 @@ func UpdateComment(doer *User, c *Comment, oldContent string) error {
Sender: doer.APIFormat(),
}); err != nil {
log.Error(2, "PrepareWebhooks [comment_id: %d]: %v", c.ID, err)
+ } else {
+ go HookQueue.Add(c.Issue.Repo.ID)
}
return nil
@@ -805,6 +809,8 @@ func DeleteComment(doer *User, comment *Comment) error {
Sender: doer.APIFormat(),
}); err != nil {
log.Error(2, "PrepareWebhooks [comment_id: %d]: %v", comment.ID, err)
+ } else {
+ go HookQueue.Add(comment.Issue.Repo.ID)
}
return nil