1
0
Fork 0
forked from forgejo/forgejo

Improve webhooks (#8583)

* Improve webhooks

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update MSTeams and ReviewPayload comment

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add repo.FullName to comments

Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
John Olheiser 2019-10-18 17:42:04 -05:00 committed by zeripath
parent 05e437f8fd
commit 0a004a69cd
6 changed files with 167 additions and 94 deletions

View file

@ -38,6 +38,7 @@ func CreateIssueComment(doer *models.User, repo *models.Repository, issue *model
Comment: comment.APIFormat(),
Repository: repo.APIFormat(mode),
Sender: doer.APIFormat(),
IsPull: issue.IsPull,
}); err != nil {
log.Error("PrepareWebhooks [comment_id: %d]: %v", comment.ID, err)
} else {
@ -128,6 +129,7 @@ func UpdateComment(c *models.Comment, doer *models.User, oldContent string) erro
},
Repository: c.Issue.Repo.APIFormat(mode),
Sender: doer.APIFormat(),
IsPull: c.Issue.IsPull,
}); err != nil {
log.Error("PrepareWebhooks [comment_id: %d]: %v", c.ID, err)
} else {
@ -162,6 +164,7 @@ func DeleteComment(comment *models.Comment, doer *models.User) error {
Comment: comment.APIFormat(),
Repository: comment.Issue.Repo.APIFormat(mode),
Sender: doer.APIFormat(),
IsPull: comment.Issue.IsPull,
}); err != nil {
log.Error("PrepareWebhooks [comment_id: %d]: %v", comment.ID, err)
} else {