Skip to content

Commit 01175c5

Browse files
committed
Add support for github app authorization (google#959)
1 parent f9794a8 commit 01175c5

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

github/event.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ func (e *Event) ParsePayload() (payload interface{}, err error) {
4646
payload = &DeploymentStatusEvent{}
4747
case "ForkEvent":
4848
payload = &ForkEvent{}
49+
case "GitHubAppAuthorizationEvent":
50+
payload = &GitHubAppAuthorizationEvent{}
4951
case "GollumEvent":
5052
payload = &GollumEvent{}
5153
case "InstallationEvent":

github/event_types.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@ type ForkEvent struct {
139139
Installation *Installation `json:"installation,omitempty"`
140140
}
141141

142+
// GitHubAppAuthorizationEvent is triggered when a user's authorization for a
143+
// GitHub Application is revoked.
144+
//
145+
// GitHub API docs: https://developer.github.com/v3/activity/events/types/#githubappauthorizationevent
146+
type GitHubAppAuthorizationEvent struct {
147+
// The action performed. Can be "revoked".
148+
Action *string `json:"action,omitempty"`
149+
150+
// The following fields are only populated by Webhook events.
151+
Sender *User `json:"sender,omitempty"`
152+
}
153+
142154
// Page represents a single Wiki page.
143155
type Page struct {
144156
PageName *string `json:"page_name,omitempty"`

github/github-accessors.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)