summaryrefslogtreecommitdiffstats
path: root/services/pull
diff options
context:
space:
mode:
authorJohn Olheiser <42128690+jolheiser@users.noreply.github.com>2019-10-18 17:42:04 -0500
committerzeripath <art27@cantab.net>2019-10-18 23:42:04 +0100
commit0a004a69cdcad2fa13d3d314cb984718c88a2940 (patch)
tree018ee4d70bba1b9b1f5de965cb35908380614687 /services/pull
parent05e437f8fd29d078af4148f3b2debcb789d8bfac (diff)
downloadgitea-0a004a69cdcad2fa13d3d314cb984718c88a2940.tar.gz
gitea-0a004a69cdcad2fa13d3d314cb984718c88a2940.zip
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>
Diffstat (limited to 'services/pull')
-rw-r--r--services/pull/review.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/pull/review.go b/services/pull/review.go
index 261c2d32d2..3388e4bb56 100644
--- a/services/pull/review.go
+++ b/services/pull/review.go
@@ -55,13 +55,16 @@ func reviewHook(review *models.Review) error {
if err != nil {
return err
}
-
if err := models.PrepareWebhooks(review.Issue.Repo, reviewHookType, &api.PullRequestPayload{
Action: api.HookIssueSynchronized,
Index: review.Issue.Index,
PullRequest: pr.APIFormat(),
Repository: review.Issue.Repo.APIFormat(mode),
Sender: review.Reviewer.APIFormat(),
+ Review: &api.ReviewPayload{
+ Type: string(reviewHookType),
+ Content: review.Content,
+ },
}); err != nil {
return err
}