diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/comments/comments.go | 3 | ||||
-rw-r--r-- | services/pull/review.go | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/services/comments/comments.go b/services/comments/comments.go index e8448e9065..010c0aaac7 100644 --- a/services/comments/comments.go +++ b/services/comments/comments.go @@ -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 { 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 } |