Skip to content

Commit f334d81

Browse files
authored
Change type of HookDelivery.InstallationID to int64 (#2235)
Fixes: #2234.
1 parent 504516e commit f334d81

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

github/github-accessors.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-stringify_test.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/repos_hooks_deliveries.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ import (
1717
// - https://docs.github.com/en/rest/reference/repos#list-deliveries-for-a-repository-webhook
1818
// - https://docs.github.com/en/rest/reference/repos#get-a-delivery-for-a-repository-webhook
1919
type HookDelivery struct {
20-
ID *int64 `json:"id"`
21-
GUID *string `json:"guid"`
22-
DeliveredAt *Timestamp `json:"delivered_at"`
23-
Redelivery *bool `json:"redelivery"`
24-
Duration *float64 `json:"duration"`
25-
Status *string `json:"status"`
26-
StatusCode *int `json:"status_code"`
27-
Event *string `json:"event"`
28-
Action *string `json:"action"`
29-
InstallationID *string `json:"installation_id"`
30-
RepositoryID *int64 `json:"repository_id"`
20+
ID *int64 `json:"id,omitempty"`
21+
GUID *string `json:"guid,omitempty"`
22+
DeliveredAt *Timestamp `json:"delivered_at,omitempty"`
23+
Redelivery *bool `json:"redelivery,omitempty"`
24+
Duration *float64 `json:"duration,omitempty"`
25+
Status *string `json:"status,omitempty"`
26+
StatusCode *int `json:"status_code,omitempty"`
27+
Event *string `json:"event,omitempty"`
28+
Action *string `json:"action,omitempty"`
29+
InstallationID *int64 `json:"installation_id,omitempty"`
30+
RepositoryID *int64 `json:"repository_id,omitempty"`
3131

3232
// Request is populated by GetHookDelivery.
3333
Request *HookRequest `json:"request,omitempty"`

github/repos_hooks_deliveries_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func TestHookDelivery_Marshal(t *testing.T) {
288288
StatusCode: Int(1),
289289
Event: String("guid"),
290290
Action: String("guid"),
291-
InstallationID: String("guid"),
291+
InstallationID: Int64(1),
292292
RepositoryID: Int64(1),
293293
Request: &HookRequest{
294294
Headers: header,
@@ -310,7 +310,7 @@ func TestHookDelivery_Marshal(t *testing.T) {
310310
"status_code": 1,
311311
"event": "guid",
312312
"action": "guid",
313-
"installation_id": "guid",
313+
"installation_id": 1,
314314
"repository_id": 1,
315315
"request": {
316316
"headers": {

0 commit comments

Comments
 (0)