From 0a004a69cdcad2fa13d3d314cb984718c88a2940 Mon Sep 17 00:00:00 2001 From: John Olheiser <42128690+jolheiser@users.noreply.github.com> Date: Fri, 18 Oct 2019 17:42:04 -0500 Subject: Improve webhooks (#8583) * Improve webhooks Signed-off-by: jolheiser * Update MSTeams and ReviewPayload comment Signed-off-by: jolheiser * Add repo.FullName to comments Signed-off-by: jolheiser --- modules/structs/hook.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules') diff --git a/modules/structs/hook.go b/modules/structs/hook.go index 2c923d36c5..e036442904 100644 --- a/modules/structs/hook.go +++ b/modules/structs/hook.go @@ -236,6 +236,7 @@ type IssueCommentPayload struct { Changes *ChangesPayload `json:"changes,omitempty"` Repository *Repository `json:"repository"` Sender *User `json:"sender"` + IsPull bool `json:"is_pull"` } // SetSecret modifies the secret of the IssueCommentPayload @@ -419,6 +420,7 @@ type PullRequestPayload struct { PullRequest *PullRequest `json:"pull_request"` Repository *Repository `json:"repository"` Sender *User `json:"sender"` + Review *ReviewPayload `json:"review"` } // SetSecret modifies the secret of the PullRequestPayload. @@ -431,6 +433,12 @@ func (p *PullRequestPayload) JSONPayload() ([]byte, error) { return json.MarshalIndent(p, "", " ") } +// ReviewPayload FIXME +type ReviewPayload struct { + Type string `json:"type"` + Content string `json:"content"` +} + //__________ .__ __ //\______ \ ____ ______ ____ _____|__|/ |_ ___________ ___.__. // | _// __ \\____ \ / _ \/ ___/ \ __\/ _ \_ __ < | | -- cgit v1.2.3