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"`