Skip to content

Commit a92f7df

Browse files
MorrisLawMatt Gaunt
authored and
Matt Gaunt
committed
Add support for github app authorization (#959) (#1028)
1 parent b5e31d6 commit a92f7df

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
@@ -148,6 +148,18 @@ type ForkEvent struct {
148148
Installation *Installation `json:"installation,omitempty"`
149149
}
150150

151+
// GitHubAppAuthorizationEvent is triggered when a user's authorization for a
152+
// GitHub Application is revoked.
153+
//
154+
// GitHub API docs: https://developer.github.com/v3/activity/events/types/#githubappauthorizationevent
155+
type GitHubAppAuthorizationEvent struct {
156+
// The action performed. Can be "revoked".
157+
Action *string `json:"action,omitempty"`
158+
159+
// The following fields are only populated by Webhook events.
160+
Sender *User `json:"sender,omitempty"`
161+
}
162+
151163
// Page represents a single Wiki page.
152164
type Page struct {
153165
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)