summaryrefslogtreecommitdiffstats
path: root/modules/structs/hook.go
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 /modules/structs/hook.go
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 'modules/structs/hook.go')
-rw-r--r--modules/structs/hook.go8
1 files changed, 8 insertions, 0 deletions
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"`
+}
+
//__________ .__ __
//\______ \ ____ ______ ____ _____|__|/ |_ ___________ ___.__.
// | _// __ \\____ \ / _ \/ ___/ \ __\/ _ \_ __ < | |