Skip to content

Commit

Permalink
Fix JSON unmarshal error of App.app.events
Browse files Browse the repository at this point in the history
I got following error.
json: cannot unmarshal string into Go struct field App.app.events of
type github.Event

It's regression from google#1283 and event type should be actually string [1][2].

[1]: https://developer.github.com/v3/apps/#get-a-single-github-app
[2]: https://developer.github.com/v3/repos/branches/#list-apps-with-access-to-protected-branch
  • Loading branch information
haya14busa committed Jan 9, 2020
1 parent 78e8856 commit d2678e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type App struct {
CreatedAt *Timestamp `json:"created_at,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
Permissions *InstallationPermissions `json:"permissions,omitempty"`
Events []*Event `json:"events,omitempty"`
Events []string `json:"events,omitempty"`
}

// InstallationToken represents an installation token.
Expand Down

0 comments on commit d2678e8

Please sign in to comment.