Skip to content

Commit edaedd4

Browse files
author
Dean Karn
authored
Merge pull request #144 from iamsumit/issue-47
Changed date field from int64 to time.Time to fix the parsing error.
2 parents 9c954e2 + b793bbf commit edaedd4

6 files changed

+20
-20
lines changed

github/github_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ func TestWebhooks(t *testing.T) {
240240
filename: "../testdata/github/installation.json",
241241
headers: http.Header{
242242
"X-Github-Event": []string{"installation"},
243-
"X-Hub-Signature": []string{"sha1=2058cf6cc28570710afbc638e669f5c67305a2db"},
243+
"X-Hub-Signature": []string{"sha1=2bcb4ad96133ce2dd6d140fad7a80a2b14407f7f"},
244244
},
245245
},
246246
{
@@ -250,7 +250,7 @@ func TestWebhooks(t *testing.T) {
250250
filename: "../testdata/github/installation-repositories.json",
251251
headers: http.Header{
252252
"X-Github-Event": []string{"installation_repositories"},
253-
"X-Hub-Signature": []string{"sha1=c587fbd9dd169db8ae592b3bcc80b08e2e6f4f45"},
253+
"X-Hub-Signature": []string{"sha1=997680ef1e6f4a6b6595f5fa70b82989f505137f"},
254254
},
255255
},
256256
{
@@ -260,7 +260,7 @@ func TestWebhooks(t *testing.T) {
260260
filename: "../testdata/github/integration-installation.json",
261261
headers: http.Header{
262262
"X-Github-Event": []string{"integration_installation"},
263-
"X-Hub-Signature": []string{"sha1=bb2769f05f1a11af3a1edf8f9fac11bae7402a1e"},
263+
"X-Hub-Signature": []string{"sha1=1172601d35bdebac5f3aa7618c9e58eafb404c6f"},
264264
},
265265
},
266266
{
@@ -270,7 +270,7 @@ func TestWebhooks(t *testing.T) {
270270
filename: "../testdata/github/integration-installation-repositories.json",
271271
headers: http.Header{
272272
"X-Github-Event": []string{"integration_installation_repositories"},
273-
"X-Hub-Signature": []string{"sha1=2f00a982574188342c2894eb9d1b1e93434687fb"},
273+
"X-Hub-Signature": []string{"sha1=7c38ba703a3c89d00823920a47cd8863df8121d2"},
274274
},
275275
},
276276
{

github/payload.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,10 +1587,10 @@ type InstallationPayload struct {
15871587
PullRequests string `json:"pull_requests"`
15881588
RepositoryProjects string `json:"repository_projects"`
15891589
} `json:"permissions"`
1590-
Events []string `json:"events"`
1591-
CreatedAt int64 `json:"created_at"`
1592-
UpdatedAt int64 `json:"updated_at"`
1593-
SingleFileName *string `json:"single_file_name"`
1590+
Events []string `json:"events"`
1591+
CreatedAt time.Time `json:"created_at"`
1592+
UpdatedAt time.Time `json:"updated_at"`
1593+
SingleFileName *string `json:"single_file_name"`
15941594
} `json:"installation"`
15951595
Repositories []struct {
15961596
ID int64 `json:"id"`
@@ -1665,10 +1665,10 @@ type InstallationRepositoriesPayload struct {
16651665
Deployments string `json:"deployments"`
16661666
Contents string `json:"contents"`
16671667
} `json:"permissions"`
1668-
Events []string `json:"events"`
1669-
CreatedAt int64 `json:"created_at"`
1670-
UpdatedAt int64 `json:"updated_at"`
1671-
SingleFileName *string `json:"single_file_name"`
1668+
Events []string `json:"events"`
1669+
CreatedAt time.Time `json:"created_at"`
1670+
UpdatedAt time.Time `json:"updated_at"`
1671+
SingleFileName *string `json:"single_file_name"`
16721672
} `json:"installation"`
16731673
RepositoriesAdded []struct {
16741674
ID int64 `json:"id"`

testdata/github/installation-repositories.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"push",
3939
"pull_request"
4040
],
41-
"created_at": 1525109898,
42-
"updated_at": 1525109899,
41+
"created_at": "2022-03-02T18:02:51.000Z",
42+
"updated_at": "2022-03-02T18:02:51.000Z",
4343
"single_file_name": "config.yml"
4444
},
4545
"repository_selection": "selected",

testdata/github/installation.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"push",
3939
"pull_request"
4040
],
41-
"created_at": 1525109898,
42-
"updated_at": 1525109899,
41+
"created_at": "2022-03-02T18:02:51.000Z",
42+
"updated_at": "2022-03-02T18:02:51.000Z",
4343
"single_file_name": "config.yml"
4444
},
4545
"repositories": [

testdata/github/integration-installation-repositories.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"push",
3939
"pull_request"
4040
],
41-
"created_at": 1525109898,
42-
"updated_at": 1525109899,
41+
"created_at": "2022-03-02T18:02:51.000Z",
42+
"updated_at": "2022-03-02T18:02:51.000Z",
4343
"single_file_name": "config.yml"
4444
},
4545
"repository_selection": "selected",

testdata/github/integration-installation.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
"events": [
3838
"pull_request"
3939
],
40-
"created_at": 1516025475,
41-
"updated_at": 1516025475,
40+
"created_at": "2022-03-02T18:02:51.000Z",
41+
"updated_at": "2022-03-02T18:02:51.000Z",
4242
"single_file_name": null
4343
},
4444
"repositories": [

0 commit comments

Comments
 (0)