Compare commits

..

5 Commits

Author SHA1 Message Date
Dean Karn 4f72f9c366 Update README.md 2022-04-29 21:59:45 -07:00
Dean Karn edaedd4ce9 Merge pull request #144 from iamsumit/issue-47
Changed date field from int64 to time.Time to fix the parsing error.
2022-04-29 21:53:40 -07:00
Sumit Madan b793bbfed1 Fixed test for integration installation events. 2022-03-08 11:04:06 +05:30
Sumit Madan c4e51bc4db Updated test with new changes. 2022-03-08 10:55:28 +05:30
Sumit Madan f22656b35f Changed date field from int64 to time.Time to fix the parsing error. 2022-03-07 13:14:21 +05:30
7 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
Library webhooks Library webhooks
================ ================
<img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v6/logo.png">![Project status](https://img.shields.io/badge/version-6.0.0-green.svg) <img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v6/logo.png">![Project status](https://img.shields.io/badge/version-6.0.1-green.svg)
[![Test](https://github.com/go-playground/webhooks/workflows/Test/badge.svg?branch=master)](https://github.com/go-playground/webhooks/actions) [![Test](https://github.com/go-playground/webhooks/workflows/Test/badge.svg?branch=master)](https://github.com/go-playground/webhooks/actions)
[![Coverage Status](https://coveralls.io/repos/go-playground/webhooks/badge.svg?branch=master&service=github)](https://coveralls.io/github/go-playground/webhooks?branch=master) [![Coverage Status](https://coveralls.io/repos/go-playground/webhooks/badge.svg?branch=master&service=github)](https://coveralls.io/github/go-playground/webhooks?branch=master)
[![Go Report Card](https://goreportcard.com/badge/go-playground/webhooks)](https://goreportcard.com/report/go-playground/webhooks) [![Go Report Card](https://goreportcard.com/badge/go-playground/webhooks)](https://goreportcard.com/report/go-playground/webhooks)
+4 -4
View File
@@ -240,7 +240,7 @@ func TestWebhooks(t *testing.T) {
filename: "../testdata/github/installation.json", filename: "../testdata/github/installation.json",
headers: http.Header{ headers: http.Header{
"X-Github-Event": []string{"installation"}, "X-Github-Event": []string{"installation"},
"X-Hub-Signature": []string{"sha1=2058cf6cc28570710afbc638e669f5c67305a2db"}, "X-Hub-Signature": []string{"sha1=2bcb4ad96133ce2dd6d140fad7a80a2b14407f7f"},
}, },
}, },
{ {
@@ -250,7 +250,7 @@ func TestWebhooks(t *testing.T) {
filename: "../testdata/github/installation-repositories.json", filename: "../testdata/github/installation-repositories.json",
headers: http.Header{ headers: http.Header{
"X-Github-Event": []string{"installation_repositories"}, "X-Github-Event": []string{"installation_repositories"},
"X-Hub-Signature": []string{"sha1=c587fbd9dd169db8ae592b3bcc80b08e2e6f4f45"}, "X-Hub-Signature": []string{"sha1=997680ef1e6f4a6b6595f5fa70b82989f505137f"},
}, },
}, },
{ {
@@ -260,7 +260,7 @@ func TestWebhooks(t *testing.T) {
filename: "../testdata/github/integration-installation.json", filename: "../testdata/github/integration-installation.json",
headers: http.Header{ headers: http.Header{
"X-Github-Event": []string{"integration_installation"}, "X-Github-Event": []string{"integration_installation"},
"X-Hub-Signature": []string{"sha1=bb2769f05f1a11af3a1edf8f9fac11bae7402a1e"}, "X-Hub-Signature": []string{"sha1=1172601d35bdebac5f3aa7618c9e58eafb404c6f"},
}, },
}, },
{ {
@@ -270,7 +270,7 @@ func TestWebhooks(t *testing.T) {
filename: "../testdata/github/integration-installation-repositories.json", filename: "../testdata/github/integration-installation-repositories.json",
headers: http.Header{ headers: http.Header{
"X-Github-Event": []string{"integration_installation_repositories"}, "X-Github-Event": []string{"integration_installation_repositories"},
"X-Hub-Signature": []string{"sha1=2f00a982574188342c2894eb9d1b1e93434687fb"}, "X-Hub-Signature": []string{"sha1=7c38ba703a3c89d00823920a47cd8863df8121d2"},
}, },
}, },
{ {
+8 -8
View File
@@ -1587,10 +1587,10 @@ type InstallationPayload struct {
PullRequests string `json:"pull_requests"` PullRequests string `json:"pull_requests"`
RepositoryProjects string `json:"repository_projects"` RepositoryProjects string `json:"repository_projects"`
} `json:"permissions"` } `json:"permissions"`
Events []string `json:"events"` Events []string `json:"events"`
CreatedAt int64 `json:"created_at"` CreatedAt time.Time `json:"created_at"`
UpdatedAt int64 `json:"updated_at"` UpdatedAt time.Time `json:"updated_at"`
SingleFileName *string `json:"single_file_name"` SingleFileName *string `json:"single_file_name"`
} `json:"installation"` } `json:"installation"`
Repositories []struct { Repositories []struct {
ID int64 `json:"id"` ID int64 `json:"id"`
@@ -1665,10 +1665,10 @@ type InstallationRepositoriesPayload struct {
Deployments string `json:"deployments"` Deployments string `json:"deployments"`
Contents string `json:"contents"` Contents string `json:"contents"`
} `json:"permissions"` } `json:"permissions"`
Events []string `json:"events"` Events []string `json:"events"`
CreatedAt int64 `json:"created_at"` CreatedAt time.Time `json:"created_at"`
UpdatedAt int64 `json:"updated_at"` UpdatedAt time.Time `json:"updated_at"`
SingleFileName *string `json:"single_file_name"` SingleFileName *string `json:"single_file_name"`
} `json:"installation"` } `json:"installation"`
RepositoriesAdded []struct { RepositoriesAdded []struct {
ID int64 `json:"id"` ID int64 `json:"id"`
+2 -2
View File
@@ -38,8 +38,8 @@
"push", "push",
"pull_request" "pull_request"
], ],
"created_at": 1525109898, "created_at": "2022-03-02T18:02:51.000Z",
"updated_at": 1525109899, "updated_at": "2022-03-02T18:02:51.000Z",
"single_file_name": "config.yml" "single_file_name": "config.yml"
}, },
"repository_selection": "selected", "repository_selection": "selected",
+2 -2
View File
@@ -38,8 +38,8 @@
"push", "push",
"pull_request" "pull_request"
], ],
"created_at": 1525109898, "created_at": "2022-03-02T18:02:51.000Z",
"updated_at": 1525109899, "updated_at": "2022-03-02T18:02:51.000Z",
"single_file_name": "config.yml" "single_file_name": "config.yml"
}, },
"repositories": [ "repositories": [
+2 -2
View File
@@ -38,8 +38,8 @@
"push", "push",
"pull_request" "pull_request"
], ],
"created_at": 1525109898, "created_at": "2022-03-02T18:02:51.000Z",
"updated_at": 1525109899, "updated_at": "2022-03-02T18:02:51.000Z",
"single_file_name": "config.yml" "single_file_name": "config.yml"
}, },
"repository_selection": "selected", "repository_selection": "selected",
+2 -2
View File
@@ -37,8 +37,8 @@
"events": [ "events": [
"pull_request" "pull_request"
], ],
"created_at": 1516025475, "created_at": "2022-03-02T18:02:51.000Z",
"updated_at": 1516025475, "updated_at": "2022-03-02T18:02:51.000Z",
"single_file_name": null "single_file_name": null
}, },
"repositories": [ "repositories": [