From 7d32ff9dbfa03dd10b31e2e5feb4017dc07b16c3 Mon Sep 17 00:00:00 2001 From: Brett Logan Date: Tue, 30 Mar 2021 22:50:00 -0400 Subject: [PATCH] Update hook_id to int64 The hook_id field is not a string it represented as a number, updated the HookID to int64. Signed-off-by: Brett Logan --- github/github-accessors.go | 4 ++-- github/github-accessors_test.go | 2 +- github/orgs_audit_log.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/github/github-accessors.go b/github/github-accessors.go index d6e13c1bcfd..86ca2526b3c 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -701,9 +701,9 @@ func (a *AuditEntry) GetHeadSHA() string { } // GetHookID returns the HookID field if it's non-nil, zero value otherwise. -func (a *AuditEntry) GetHookID() string { +func (a *AuditEntry) GetHookID() int64 { if a == nil || a.HookID == nil { - return "" + return 0 } return *a.HookID } diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index bc4ff4e2a05..5be1c304ffe 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -826,7 +826,7 @@ func TestAuditEntry_GetHeadSHA(tt *testing.T) { } func TestAuditEntry_GetHookID(tt *testing.T) { - var zeroValue string + var zeroValue int64 a := &AuditEntry{HookID: &zeroValue} a.GetHookID() a = &AuditEntry{} diff --git a/github/orgs_audit_log.go b/github/orgs_audit_log.go index e91f00090ee..81f0edac9bc 100644 --- a/github/orgs_audit_log.go +++ b/github/orgs_audit_log.go @@ -53,7 +53,7 @@ type AuditEntry struct { Fingerprint *string `json:"fingerprint,omitempty"` HeadBranch *string `json:"head_branch,omitempty"` HeadSHA *string `json:"head_sha,omitempty"` - HookID *string `json:"hook_id,omitempty"` + HookID *int64 `json:"hook_id,omitempty"` IsHostedRunner *bool `json:"is_hosted_runner,omitempty"` JobName *string `json:"job_name,omitempty"` LimitedAvailability *bool `json:"limited_availability,omitempty"`