From d2678e850588a98194f2768560683e2c59f33907 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Thu, 9 Jan 2020 16:07:46 +0000 Subject: [PATCH] Fix JSON unmarshal error of App.app.events I got following error. json: cannot unmarshal string into Go struct field App.app.events of type github.Event It's regression from #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 --- github/apps.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/apps.go b/github/apps.go index 251ac631053..5bd76338dca 100644 --- a/github/apps.go +++ b/github/apps.go @@ -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.