Skip to content

Commit dd18941

Browse files
authored
Add action, organization and installation objects to WebHook payload (#1678)
Fixes #1674.
1 parent 339ae9b commit dd18941

File tree

3 files changed

+55
-25
lines changed

3 files changed

+55
-25
lines changed

Diff for: github/github-accessors.go

+24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: github/github-stringify_test.go

+16-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: github/repos_hooks.go

+15-12
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,21 @@ import (
1919
//
2020
// GitHub API docs: https://help.github.com/articles/post-receive-hooks
2121
type WebHookPayload struct {
22-
After *string `json:"after,omitempty"`
23-
Before *string `json:"before,omitempty"`
24-
Commits []*WebHookCommit `json:"commits,omitempty"`
25-
Compare *string `json:"compare,omitempty"`
26-
Created *bool `json:"created,omitempty"`
27-
Deleted *bool `json:"deleted,omitempty"`
28-
Forced *bool `json:"forced,omitempty"`
29-
HeadCommit *WebHookCommit `json:"head_commit,omitempty"`
30-
Pusher *User `json:"pusher,omitempty"`
31-
Ref *string `json:"ref,omitempty"`
32-
Repo *Repository `json:"repository,omitempty"`
33-
Sender *User `json:"sender,omitempty"`
22+
Action *string `json:"action,omitempty"`
23+
After *string `json:"after,omitempty"`
24+
Before *string `json:"before,omitempty"`
25+
Commits []*WebHookCommit `json:"commits,omitempty"`
26+
Compare *string `json:"compare,omitempty"`
27+
Created *bool `json:"created,omitempty"`
28+
Deleted *bool `json:"deleted,omitempty"`
29+
Forced *bool `json:"forced,omitempty"`
30+
HeadCommit *WebHookCommit `json:"head_commit,omitempty"`
31+
Installation *Installation `json:"installation,omitempty"`
32+
Organization *Organization `json:"organization,omitempty"`
33+
Pusher *User `json:"pusher,omitempty"`
34+
Ref *string `json:"ref,omitempty"`
35+
Repo *Repository `json:"repository,omitempty"`
36+
Sender *User `json:"sender,omitempty"`
3437
}
3538

3639
func (w WebHookPayload) String() string {

0 commit comments

Comments
 (0)