diff --git a/github/github-accessors.go b/github/github-accessors.go index 7806d4d16d..e7cfa86f89 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -20694,6 +20694,30 @@ func (s *SecretScanningAlert) GetNumber() int { return *s.Number } +// GetPushProtectionBypassed returns the PushProtectionBypassed field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetPushProtectionBypassed() bool { + if s == nil || s.PushProtectionBypassed == nil { + return false + } + return *s.PushProtectionBypassed +} + +// GetPushProtectionBypassedAt returns the PushProtectionBypassedAt field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetPushProtectionBypassedAt() Timestamp { + if s == nil || s.PushProtectionBypassedAt == nil { + return Timestamp{} + } + return *s.PushProtectionBypassedAt +} + +// GetPushProtectionBypassedBy returns the PushProtectionBypassedBy field. +func (s *SecretScanningAlert) GetPushProtectionBypassedBy() *User { + if s == nil { + return nil + } + return s.PushProtectionBypassedBy +} + // GetRepository returns the Repository field. func (s *SecretScanningAlert) GetRepository() *Repository { if s == nil { @@ -20710,6 +20734,14 @@ func (s *SecretScanningAlert) GetResolution() string { return *s.Resolution } +// GetResolutionComment returns the ResolutionComment field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetResolutionComment() string { + if s == nil || s.ResolutionComment == nil { + return "" + } + return *s.ResolutionComment +} + // GetResolvedAt returns the ResolvedAt field if it's non-nil, zero value otherwise. func (s *SecretScanningAlert) GetResolvedAt() Timestamp { if s == nil || s.ResolvedAt == nil { @@ -20758,6 +20790,14 @@ func (s *SecretScanningAlert) GetState() string { return *s.State } +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (s *SecretScanningAlert) GetUpdatedAt() Timestamp { + if s == nil || s.UpdatedAt == nil { + return Timestamp{} + } + return *s.UpdatedAt +} + // GetURL returns the URL field if it's non-nil, zero value otherwise. func (s *SecretScanningAlert) GetURL() string { if s == nil || s.URL == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index ec74394cff..e2918beaff 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -24140,6 +24140,33 @@ func TestSecretScanningAlert_GetNumber(tt *testing.T) { s.GetNumber() } +func TestSecretScanningAlert_GetPushProtectionBypassed(tt *testing.T) { + var zeroValue bool + s := &SecretScanningAlert{PushProtectionBypassed: &zeroValue} + s.GetPushProtectionBypassed() + s = &SecretScanningAlert{} + s.GetPushProtectionBypassed() + s = nil + s.GetPushProtectionBypassed() +} + +func TestSecretScanningAlert_GetPushProtectionBypassedAt(tt *testing.T) { + var zeroValue Timestamp + s := &SecretScanningAlert{PushProtectionBypassedAt: &zeroValue} + s.GetPushProtectionBypassedAt() + s = &SecretScanningAlert{} + s.GetPushProtectionBypassedAt() + s = nil + s.GetPushProtectionBypassedAt() +} + +func TestSecretScanningAlert_GetPushProtectionBypassedBy(tt *testing.T) { + s := &SecretScanningAlert{} + s.GetPushProtectionBypassedBy() + s = nil + s.GetPushProtectionBypassedBy() +} + func TestSecretScanningAlert_GetRepository(tt *testing.T) { s := &SecretScanningAlert{} s.GetRepository() @@ -24157,6 +24184,16 @@ func TestSecretScanningAlert_GetResolution(tt *testing.T) { s.GetResolution() } +func TestSecretScanningAlert_GetResolutionComment(tt *testing.T) { + var zeroValue string + s := &SecretScanningAlert{ResolutionComment: &zeroValue} + s.GetResolutionComment() + s = &SecretScanningAlert{} + s.GetResolutionComment() + s = nil + s.GetResolutionComment() +} + func TestSecretScanningAlert_GetResolvedAt(tt *testing.T) { var zeroValue Timestamp s := &SecretScanningAlert{ResolvedAt: &zeroValue} @@ -24214,6 +24251,16 @@ func TestSecretScanningAlert_GetState(tt *testing.T) { s.GetState() } +func TestSecretScanningAlert_GetUpdatedAt(tt *testing.T) { + var zeroValue Timestamp + s := &SecretScanningAlert{UpdatedAt: &zeroValue} + s.GetUpdatedAt() + s = &SecretScanningAlert{} + s.GetUpdatedAt() + s = nil + s.GetUpdatedAt() +} + func TestSecretScanningAlert_GetURL(tt *testing.T) { var zeroValue string s := &SecretScanningAlert{URL: &zeroValue} diff --git a/github/secret_scanning.go b/github/secret_scanning.go index b8295cbf79..bea3f0e701 100644 --- a/github/secret_scanning.go +++ b/github/secret_scanning.go @@ -16,19 +16,24 @@ 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"` + 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"` } // SecretScanningAlertLocation represents the location for a secret scanning alert.