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

@ -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"`
}
//__________ .__ __
//\______ \ ____ ______ ____ _____|__|/ |_ ___________ ___.__.
// | _// __ \\____ \ / _ \/ ___/ \ __\/ _ \_ __ < | |