-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scanning validity checks #3026
Add scanning validity checks #3026
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
I've managed to accept CLA and added my github email address as an alternative but I cannot rerun workflow (and don't want to commit pointless commits). @gmlewis could you rerun workflow for me? |
github/repos.go
Outdated
@@ -198,6 +198,7 @@ type SecurityAndAnalysis struct { | |||
SecretScanning *SecretScanning `json:"secret_scanning,omitempty"` | |||
SecretScanningPushProtection *SecretScanningPushProtection `json:"secret_scanning_push_protection,omitempty"` | |||
DependabotSecurityUpdates *DependabotSecurityUpdates `json:"dependabot_security_updates,omitempty"` | |||
SecretScanningValidityChecks *SecretScanningValidityChecks `json:"secret_scanning_validity_checks"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SecretScanningValidityChecks *SecretScanningValidityChecks `json:"secret_scanning_validity_checks"` | |
SecretScanningValidityChecks *SecretScanningValidityChecks `json:"secret_scanning_validity_checks,omitempty"` |
github/repos.go
Outdated
@@ -248,6 +249,17 @@ func (d DependabotSecurityUpdates) String() string { | |||
return Stringify(d) | |||
} | |||
|
|||
// Specifies the state of secret scanning validity checks on a repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Specifies the state of secret scanning validity checks on a repository. | |
// SecretScanningValidityChecks represents the state of secret scanning validity checks on a repository. |
github/repos.go
Outdated
@@ -248,6 +249,17 @@ func (d DependabotSecurityUpdates) String() string { | |||
return Stringify(d) | |||
} | |||
|
|||
// Specifies the state of secret scanning validity checks on a repository. | |||
// | |||
// Github API docs: https://docs.github.com/en/enterprise-cloud@latest/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#allowing-validity-checks-for-partner-patterns-in-a-repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Github" => "GitHub" - but if you run the commands in step 4 of CONTRIBUTING.md, then this will most likely get fixed automatically.
…etScanningValidityChecks's field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @tomasz-adam-skrzypczak !
Just one small nit, please, then we should be ready for a second LGTM+Approval from any other contributor to this repo before merging.
github/repos.go
Outdated
func (s SecretScanningValidityChecks) String() string { | ||
return Stringify(s) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this can be completely removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @tomasz-adam-skrzypczak !
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
Whups, please run step 4 of CONTRIBUTING.md and push the results. |
…existing String() method
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3026 +/- ##
=======================================
Coverage 97.91% 97.91%
=======================================
Files 150 150
Lines 12980 12980
=======================================
Hits 12710 12710
Misses 192 192
Partials 78 78 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you, @rufusnufus ! |
Solves #3006