Skip to content
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

Merged

Conversation

tomasz-adam-skrzypczak
Copy link
Contributor

Solves #3006

Copy link

google-cla bot commented Dec 11, 2023

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.

@tomasz-adam-skrzypczak tomasz-adam-skrzypczak marked this pull request as draft December 11, 2023 14:26
@tomasz-adam-skrzypczak tomasz-adam-skrzypczak marked this pull request as ready for review December 11, 2023 14:27
@tomasz-adam-skrzypczak
Copy link
Contributor Author

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?

@gmlewis gmlewis changed the title feat: scanning validity checks Add scanning validity checks Dec 11, 2023
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"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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
Copy link
Collaborator

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.

Copy link
Collaborator

@gmlewis gmlewis left a 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
Comment on lines 259 to 261
func (s SecretScanningValidityChecks) String() string {
return Stringify(s)
}
Copy link
Collaborator

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.

@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Dec 12, 2023
Copy link
Collaborator

@gmlewis gmlewis left a 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.

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 12, 2023

Whups, please run step 4 of CONTRIBUTING.md and push the results.

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fb8a83d) 97.91% compared to head (ad453fa) 97.91%.

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@rufusnufus rufusnufus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Dec 14, 2023
@gmlewis
Copy link
Collaborator

gmlewis commented Dec 14, 2023

Thank you, @rufusnufus !
Merging.

@gmlewis gmlewis merged commit c4ec327 into google:master Dec 14, 2023
7 checks passed
gmlewis pushed a commit to WillAbides/go-github that referenced this pull request Dec 18, 2023
gmlewis pushed a commit to o-sama/go-github that referenced this pull request Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants