From eff6f4b4ebc883fd9e9ece3aa7b4b6145033df5c Mon Sep 17 00:00:00 2001 From: Matt Fleury Date: Mon, 14 Apr 2025 14:03:10 -0400 Subject: [PATCH 1/7] feat: adding new fields --- github/github-accessors.go | 64 +++++++++++++++++++++++++ github/github-accessors_test.go | 85 +++++++++++++++++++++++++++++++++ github/secret_scanning.go | 50 ++++++++++++------- 3 files changed, 181 insertions(+), 18 deletions(-) diff --git a/github/github-accessors.go b/github/github-accessors.go index 1e2442789d6..2658356d6da 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -24662,6 +24662,14 @@ func (s *SecretScanning) GetStatus() string { return *s.Status } +// GetBase64Encoded returns the Base64Encoded field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetBase64Encoded() bool { + if s == nil || s.Base64Encoded == nil { + return false + } + return *s.Base64Encoded +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (s *SecretScanningAlert) GetCreatedAt() Timestamp { if s == nil || s.CreatedAt == nil { @@ -24686,6 +24694,14 @@ func (s *SecretScanningAlert) GetLocationsURL() string { return *s.LocationsURL } +// GetMultiRepo returns the MultiRepo field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetMultiRepo() bool { + if s == nil || s.MultiRepo == nil { + return false + } + return *s.MultiRepo +} + // GetNumber returns the Number field if it's non-nil, zero value otherwise. func (s *SecretScanningAlert) GetNumber() int { if s == nil || s.Number == nil { @@ -24694,6 +24710,14 @@ func (s *SecretScanningAlert) GetNumber() int { return *s.Number } +// GetPubliclyLeaked returns the PubliclyLeaked field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetPubliclyLeaked() bool { + if s == nil || s.PubliclyLeaked == nil { + return false + } + return *s.PubliclyLeaked +} + // GetPushProtectionBypassed returns the PushProtectionBypassed field if it's non-nil, zero value otherwise. func (s *SecretScanningAlert) GetPushProtectionBypassed() bool { if s == nil || s.PushProtectionBypassed == nil { @@ -24718,6 +24742,38 @@ func (s *SecretScanningAlert) GetPushProtectionBypassedBy() *User { return s.PushProtectionBypassedBy } +// GetPushProtectionBypassRequestComment returns the PushProtectionBypassRequestComment field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetPushProtectionBypassRequestComment() string { + if s == nil || s.PushProtectionBypassRequestComment == nil { + return "" + } + return *s.PushProtectionBypassRequestComment +} + +// GetPushProtectionBypassRequestHtmlUrl returns the PushProtectionBypassRequestHtmlUrl field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetPushProtectionBypassRequestHtmlUrl() string { + if s == nil || s.PushProtectionBypassRequestHtmlUrl == nil { + return "" + } + return *s.PushProtectionBypassRequestHtmlUrl +} + +// GetPushProtectionBypassRequestReviewer returns the PushProtectionBypassRequestReviewer field. +func (s *SecretScanningAlert) GetPushProtectionBypassRequestReviewer() *User { + if s == nil { + return nil + } + return s.PushProtectionBypassRequestReviewer +} + +// GetPushProtectionBypassRequestReviewerComment returns the PushProtectionBypassRequestReviewerComment field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetPushProtectionBypassRequestReviewerComment() string { + if s == nil || s.PushProtectionBypassRequestReviewerComment == nil { + return "" + } + return *s.PushProtectionBypassRequestReviewerComment +} + // GetRepository returns the Repository field. func (s *SecretScanningAlert) GetRepository() *Repository { if s == nil { @@ -24806,6 +24862,14 @@ func (s *SecretScanningAlert) GetURL() string { return *s.URL } +// GetValidity returns the Validity field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetValidity() string { + if s == nil || s.Validity == nil { + return "" + } + return *s.Validity +} + // GetAction returns the Action field if it's non-nil, zero value otherwise. func (s *SecretScanningAlertEvent) GetAction() string { if s == nil || s.Action == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 8dadb706cd6..72a8505149c 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -31755,6 +31755,17 @@ func TestSecretScanning_GetStatus(tt *testing.T) { s.GetStatus() } +func TestSecretScanningAlert_GetBase64Encoded(tt *testing.T) { + tt.Parallel() + var zeroValue bool + s := &SecretScanningAlert{Base64Encoded: &zeroValue} + s.GetBase64Encoded() + s = &SecretScanningAlert{} + s.GetBase64Encoded() + s = nil + s.GetBase64Encoded() +} + func TestSecretScanningAlert_GetCreatedAt(tt *testing.T) { tt.Parallel() var zeroValue Timestamp @@ -31788,6 +31799,17 @@ func TestSecretScanningAlert_GetLocationsURL(tt *testing.T) { s.GetLocationsURL() } +func TestSecretScanningAlert_GetMultiRepo(tt *testing.T) { + tt.Parallel() + var zeroValue bool + s := &SecretScanningAlert{MultiRepo: &zeroValue} + s.GetMultiRepo() + s = &SecretScanningAlert{} + s.GetMultiRepo() + s = nil + s.GetMultiRepo() +} + func TestSecretScanningAlert_GetNumber(tt *testing.T) { tt.Parallel() var zeroValue int @@ -31799,6 +31821,17 @@ func TestSecretScanningAlert_GetNumber(tt *testing.T) { s.GetNumber() } +func TestSecretScanningAlert_GetPubliclyLeaked(tt *testing.T) { + tt.Parallel() + var zeroValue bool + s := &SecretScanningAlert{PubliclyLeaked: &zeroValue} + s.GetPubliclyLeaked() + s = &SecretScanningAlert{} + s.GetPubliclyLeaked() + s = nil + s.GetPubliclyLeaked() +} + func TestSecretScanningAlert_GetPushProtectionBypassed(tt *testing.T) { tt.Parallel() var zeroValue bool @@ -31829,6 +31862,47 @@ func TestSecretScanningAlert_GetPushProtectionBypassedBy(tt *testing.T) { s.GetPushProtectionBypassedBy() } +func TestSecretScanningAlert_GetPushProtectionBypassRequestComment(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SecretScanningAlert{PushProtectionBypassRequestComment: &zeroValue} + s.GetPushProtectionBypassRequestComment() + s = &SecretScanningAlert{} + s.GetPushProtectionBypassRequestComment() + s = nil + s.GetPushProtectionBypassRequestComment() +} + +func TestSecretScanningAlert_GetPushProtectionBypassRequestHtmlUrl(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SecretScanningAlert{PushProtectionBypassRequestHtmlUrl: &zeroValue} + s.GetPushProtectionBypassRequestHtmlUrl() + s = &SecretScanningAlert{} + s.GetPushProtectionBypassRequestHtmlUrl() + s = nil + s.GetPushProtectionBypassRequestHtmlUrl() +} + +func TestSecretScanningAlert_GetPushProtectionBypassRequestReviewer(tt *testing.T) { + tt.Parallel() + s := &SecretScanningAlert{} + s.GetPushProtectionBypassRequestReviewer() + s = nil + s.GetPushProtectionBypassRequestReviewer() +} + +func TestSecretScanningAlert_GetPushProtectionBypassRequestReviewerComment(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SecretScanningAlert{PushProtectionBypassRequestReviewerComment: &zeroValue} + s.GetPushProtectionBypassRequestReviewerComment() + s = &SecretScanningAlert{} + s.GetPushProtectionBypassRequestReviewerComment() + s = nil + s.GetPushProtectionBypassRequestReviewerComment() +} + func TestSecretScanningAlert_GetRepository(tt *testing.T) { tt.Parallel() s := &SecretScanningAlert{} @@ -31944,6 +32018,17 @@ func TestSecretScanningAlert_GetURL(tt *testing.T) { s.GetURL() } +func TestSecretScanningAlert_GetValidity(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SecretScanningAlert{Validity: &zeroValue} + s.GetValidity() + s = &SecretScanningAlert{} + s.GetValidity() + s = nil + s.GetValidity() +} + func TestSecretScanningAlertEvent_GetAction(tt *testing.T) { tt.Parallel() var zeroValue string diff --git a/github/secret_scanning.go b/github/secret_scanning.go index 4eeeba3df78..171392bc801 100644 --- a/github/secret_scanning.go +++ b/github/secret_scanning.go @@ -16,24 +16,32 @@ type SecretScanningService service // SecretScanningAlert represents a GitHub secret scanning alert. type SecretScanningAlert struct { - Number *int `json:"number,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - LocationsURL *string `json:"locations_url,omitempty"` - State *string `json:"state,omitempty"` - Resolution *string `json:"resolution,omitempty"` - ResolvedAt *Timestamp `json:"resolved_at,omitempty"` - ResolvedBy *User `json:"resolved_by,omitempty"` - SecretType *string `json:"secret_type,omitempty"` - SecretTypeDisplayName *string `json:"secret_type_display_name,omitempty"` - Secret *string `json:"secret,omitempty"` - Repository *Repository `json:"repository,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - PushProtectionBypassed *bool `json:"push_protection_bypassed,omitempty"` - PushProtectionBypassedBy *User `json:"push_protection_bypassed_by,omitempty"` - PushProtectionBypassedAt *Timestamp `json:"push_protection_bypassed_at,omitempty"` - ResolutionComment *string `json:"resolution_comment,omitempty"` + Number *int `json:"number,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + LocationsURL *string `json:"locations_url,omitempty"` + State *string `json:"state,omitempty"` + Resolution *string `json:"resolution,omitempty"` + ResolvedAt *Timestamp `json:"resolved_at,omitempty"` + ResolvedBy *User `json:"resolved_by,omitempty"` + SecretType *string `json:"secret_type,omitempty"` + SecretTypeDisplayName *string `json:"secret_type_display_name,omitempty"` + Secret *string `json:"secret,omitempty"` + Repository *Repository `json:"repository,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + Base64Encoded *bool `json:"is_base64_encoded"` + MultiRepo *bool `json:"multi_repo"` + PubliclyLeaked *bool `json:"publicly_leaked"` + PushProtectionBypassed *bool `json:"push_protection_bypassed,omitempty"` + PushProtectionBypassedBy *User `json:"push_protection_bypassed_by,omitempty"` + PushProtectionBypassedAt *Timestamp `json:"push_protection_bypassed_at,omitempty"` + ResolutionComment *string `json:"resolution_comment,omitempty"` + PushProtectionBypassRequestComment *string `json:"push_protection_bypass_request_comment"` + PushProtectionBypassRequestHtmlUrl *string `json:"push_protection_bypass_request_html_url"` + PushProtectionBypassRequestReviewer *User `json:"push_protection_bypass_request_reviewer"` + PushProtectionBypassRequestReviewerComment *string `json:"push_protection_bypass_request_reviewer_comment"` + Validity *string `json:"validity"` } // SecretScanningAlertLocation represents the location for a secret scanning alert. @@ -72,6 +80,12 @@ type SecretScanningAlertListOptions struct { // Valid options are active, inactive, and unknown. Validity string `url:"validity,omitempty"` + // A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. Default: false. + PubliclyLeaked bool `url:"is_publicly_leaked,omitempty"` + + // A boolean value representing whether or not to filter alerts by the multi-repo tag being present. Default: false. + MultiRepo bool `url:"is_multi_repo,omitempty"` + // The direction to sort the results by. Possible values are: asc, desc. Default: desc. Direction string `url:"direction,omitempty"` From 7662c367c8aba63978df4bd6e181e344f2226451 Mon Sep 17 00:00:00 2001 From: Matt Fleury <166510074+mdfleury-wbd@users.noreply.github.com> Date: Tue, 15 Apr 2025 08:00:26 -0400 Subject: [PATCH 2/7] Update github/secret_scanning.go Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> --- github/secret_scanning.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/secret_scanning.go b/github/secret_scanning.go index 171392bc801..4304b39af12 100644 --- a/github/secret_scanning.go +++ b/github/secret_scanning.go @@ -30,7 +30,7 @@ type SecretScanningAlert struct { Secret *string `json:"secret,omitempty"` Repository *Repository `json:"repository,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` - Base64Encoded *bool `json:"is_base64_encoded"` + IsBase64Encoded *bool `json:"is_base64_encoded,omitempty"` MultiRepo *bool `json:"multi_repo"` PubliclyLeaked *bool `json:"publicly_leaked"` PushProtectionBypassed *bool `json:"push_protection_bypassed,omitempty"` From 473e9cfddff141e79a1173fb4ec4512ffff5ec84 Mon Sep 17 00:00:00 2001 From: Matt Fleury <166510074+mdfleury-wbd@users.noreply.github.com> Date: Tue, 15 Apr 2025 08:00:32 -0400 Subject: [PATCH 3/7] Update github/secret_scanning.go Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> --- github/secret_scanning.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github/secret_scanning.go b/github/secret_scanning.go index 4304b39af12..e24b069910d 100644 --- a/github/secret_scanning.go +++ b/github/secret_scanning.go @@ -31,8 +31,8 @@ type SecretScanningAlert struct { Repository *Repository `json:"repository,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` IsBase64Encoded *bool `json:"is_base64_encoded,omitempty"` - MultiRepo *bool `json:"multi_repo"` - PubliclyLeaked *bool `json:"publicly_leaked"` + MultiRepo *bool `json:"multi_repo,omitempty"` + PubliclyLeaked *bool `json:"publicly_leaked,omitempty"` PushProtectionBypassed *bool `json:"push_protection_bypassed,omitempty"` PushProtectionBypassedBy *User `json:"push_protection_bypassed_by,omitempty"` PushProtectionBypassedAt *Timestamp `json:"push_protection_bypassed_at,omitempty"` From 74184b94df456c171f0e73e9ddb0e301c6f965f2 Mon Sep 17 00:00:00 2001 From: Matt Fleury <166510074+mdfleury-wbd@users.noreply.github.com> Date: Tue, 15 Apr 2025 08:00:43 -0400 Subject: [PATCH 4/7] Update github/secret_scanning.go Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> --- github/secret_scanning.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/github/secret_scanning.go b/github/secret_scanning.go index e24b069910d..1bc1d85c605 100644 --- a/github/secret_scanning.go +++ b/github/secret_scanning.go @@ -37,11 +37,11 @@ type SecretScanningAlert struct { PushProtectionBypassedBy *User `json:"push_protection_bypassed_by,omitempty"` PushProtectionBypassedAt *Timestamp `json:"push_protection_bypassed_at,omitempty"` ResolutionComment *string `json:"resolution_comment,omitempty"` - PushProtectionBypassRequestComment *string `json:"push_protection_bypass_request_comment"` - PushProtectionBypassRequestHtmlUrl *string `json:"push_protection_bypass_request_html_url"` - PushProtectionBypassRequestReviewer *User `json:"push_protection_bypass_request_reviewer"` - PushProtectionBypassRequestReviewerComment *string `json:"push_protection_bypass_request_reviewer_comment"` - Validity *string `json:"validity"` + PushProtectionBypassRequestComment *string `json:"push_protection_bypass_request_comment,omitempty"` + PushProtectionBypassRequestHTMLURL *string `json:"push_protection_bypass_request_html_url,omitempty"` + PushProtectionBypassRequestReviewer *User `json:"push_protection_bypass_request_reviewer,omitempty"` + PushProtectionBypassRequestReviewerComment *string `json:"push_protection_bypass_request_reviewer_comment,omitempty"` + Validity *string `json:"validity,omitempty"` } // SecretScanningAlertLocation represents the location for a secret scanning alert. From bb2fba0043f9489ad1d534bd3a5f7ce9c0d8efda Mon Sep 17 00:00:00 2001 From: Matt Fleury <166510074+mdfleury-wbd@users.noreply.github.com> Date: Tue, 15 Apr 2025 08:00:54 -0400 Subject: [PATCH 5/7] Update github/secret_scanning.go Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> --- github/secret_scanning.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/secret_scanning.go b/github/secret_scanning.go index 1bc1d85c605..a33b1632924 100644 --- a/github/secret_scanning.go +++ b/github/secret_scanning.go @@ -81,7 +81,7 @@ type SecretScanningAlertListOptions struct { Validity string `url:"validity,omitempty"` // A boolean value representing whether or not to filter alerts by the publicly-leaked tag being present. Default: false. - PubliclyLeaked bool `url:"is_publicly_leaked,omitempty"` + IsPubliclyLeaked bool `url:"is_publicly_leaked,omitempty"` // A boolean value representing whether or not to filter alerts by the multi-repo tag being present. Default: false. MultiRepo bool `url:"is_multi_repo,omitempty"` From 5d042e6fba2556a3db4817178170d62106cc4985 Mon Sep 17 00:00:00 2001 From: Matt Fleury <166510074+mdfleury-wbd@users.noreply.github.com> Date: Tue, 15 Apr 2025 08:00:59 -0400 Subject: [PATCH 6/7] Update github/secret_scanning.go Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> --- github/secret_scanning.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/secret_scanning.go b/github/secret_scanning.go index a33b1632924..84e23915b85 100644 --- a/github/secret_scanning.go +++ b/github/secret_scanning.go @@ -84,7 +84,7 @@ type SecretScanningAlertListOptions struct { IsPubliclyLeaked bool `url:"is_publicly_leaked,omitempty"` // A boolean value representing whether or not to filter alerts by the multi-repo tag being present. Default: false. - MultiRepo bool `url:"is_multi_repo,omitempty"` + IsMultiRepo bool `url:"is_multi_repo,omitempty"` // The direction to sort the results by. Possible values are: asc, desc. Default: desc. Direction string `url:"direction,omitempty"` From cf867a5ade9079e31ed88b81173a7dd65e1ce90e Mon Sep 17 00:00:00 2001 From: Matt Fleury Date: Tue, 15 Apr 2025 08:20:31 -0400 Subject: [PATCH 7/7] format and regenerate --- github/github-accessors.go | 24 ++++++++++++------------ github/github-accessors_test.go | 32 ++++++++++++++++---------------- github/secret_scanning.go | 2 +- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/github/github-accessors.go b/github/github-accessors.go index fdfdd4a1fdc..8530cd914bc 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -24670,14 +24670,6 @@ func (s *SecretScanning) GetStatus() string { return *s.Status } -// GetBase64Encoded returns the Base64Encoded field if it's non-nil, zero value otherwise. -func (s *SecretScanningAlert) GetBase64Encoded() bool { - if s == nil || s.Base64Encoded == nil { - return false - } - return *s.Base64Encoded -} - // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (s *SecretScanningAlert) GetCreatedAt() Timestamp { if s == nil || s.CreatedAt == nil { @@ -24694,6 +24686,14 @@ func (s *SecretScanningAlert) GetHTMLURL() string { return *s.HTMLURL } +// GetIsBase64Encoded returns the IsBase64Encoded field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetIsBase64Encoded() bool { + if s == nil || s.IsBase64Encoded == nil { + return false + } + return *s.IsBase64Encoded +} + // GetLocationsURL returns the LocationsURL field if it's non-nil, zero value otherwise. func (s *SecretScanningAlert) GetLocationsURL() string { if s == nil || s.LocationsURL == nil { @@ -24758,12 +24758,12 @@ func (s *SecretScanningAlert) GetPushProtectionBypassRequestComment() string { return *s.PushProtectionBypassRequestComment } -// GetPushProtectionBypassRequestHtmlUrl returns the PushProtectionBypassRequestHtmlUrl field if it's non-nil, zero value otherwise. -func (s *SecretScanningAlert) GetPushProtectionBypassRequestHtmlUrl() string { - if s == nil || s.PushProtectionBypassRequestHtmlUrl == nil { +// GetPushProtectionBypassRequestHTMLURL returns the PushProtectionBypassRequestHTMLURL field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetPushProtectionBypassRequestHTMLURL() string { + if s == nil || s.PushProtectionBypassRequestHTMLURL == nil { return "" } - return *s.PushProtectionBypassRequestHtmlUrl + return *s.PushProtectionBypassRequestHTMLURL } // GetPushProtectionBypassRequestReviewer returns the PushProtectionBypassRequestReviewer field. diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 3f2118201f2..8b85e063f4d 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -31763,17 +31763,6 @@ func TestSecretScanning_GetStatus(tt *testing.T) { s.GetStatus() } -func TestSecretScanningAlert_GetBase64Encoded(tt *testing.T) { - tt.Parallel() - var zeroValue bool - s := &SecretScanningAlert{Base64Encoded: &zeroValue} - s.GetBase64Encoded() - s = &SecretScanningAlert{} - s.GetBase64Encoded() - s = nil - s.GetBase64Encoded() -} - func TestSecretScanningAlert_GetCreatedAt(tt *testing.T) { tt.Parallel() var zeroValue Timestamp @@ -31796,6 +31785,17 @@ func TestSecretScanningAlert_GetHTMLURL(tt *testing.T) { s.GetHTMLURL() } +func TestSecretScanningAlert_GetIsBase64Encoded(tt *testing.T) { + tt.Parallel() + var zeroValue bool + s := &SecretScanningAlert{IsBase64Encoded: &zeroValue} + s.GetIsBase64Encoded() + s = &SecretScanningAlert{} + s.GetIsBase64Encoded() + s = nil + s.GetIsBase64Encoded() +} + func TestSecretScanningAlert_GetLocationsURL(tt *testing.T) { tt.Parallel() var zeroValue string @@ -31881,15 +31881,15 @@ func TestSecretScanningAlert_GetPushProtectionBypassRequestComment(tt *testing.T s.GetPushProtectionBypassRequestComment() } -func TestSecretScanningAlert_GetPushProtectionBypassRequestHtmlUrl(tt *testing.T) { +func TestSecretScanningAlert_GetPushProtectionBypassRequestHTMLURL(tt *testing.T) { tt.Parallel() var zeroValue string - s := &SecretScanningAlert{PushProtectionBypassRequestHtmlUrl: &zeroValue} - s.GetPushProtectionBypassRequestHtmlUrl() + s := &SecretScanningAlert{PushProtectionBypassRequestHTMLURL: &zeroValue} + s.GetPushProtectionBypassRequestHTMLURL() s = &SecretScanningAlert{} - s.GetPushProtectionBypassRequestHtmlUrl() + s.GetPushProtectionBypassRequestHTMLURL() s = nil - s.GetPushProtectionBypassRequestHtmlUrl() + s.GetPushProtectionBypassRequestHTMLURL() } func TestSecretScanningAlert_GetPushProtectionBypassRequestReviewer(tt *testing.T) { diff --git a/github/secret_scanning.go b/github/secret_scanning.go index 84e23915b85..ad2312d0b2c 100644 --- a/github/secret_scanning.go +++ b/github/secret_scanning.go @@ -30,7 +30,7 @@ type SecretScanningAlert struct { Secret *string `json:"secret,omitempty"` Repository *Repository `json:"repository,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` - IsBase64Encoded *bool `json:"is_base64_encoded,omitempty"` + IsBase64Encoded *bool `json:"is_base64_encoded,omitempty"` MultiRepo *bool `json:"multi_repo,omitempty"` PubliclyLeaked *bool `json:"publicly_leaked,omitempty"` PushProtectionBypassed *bool `json:"push_protection_bypassed,omitempty"`