mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user