-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Support Code Security Configurations API #3319
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. |
This PR implements Code Security Configurations APIs as defined at https://docs.github.com/en/rest/code-security/configurations?apiVersion=2022-11-28
983763b
to
c8041cd
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3319 +/- ##
==========================================
- Coverage 97.72% 93.36% -4.36%
==========================================
Files 153 172 +19
Lines 13390 11843 -1547
==========================================
- Hits 13085 11057 -2028
- Misses 215 692 +477
- Partials 90 94 +4 ☔ 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.
Thank you, @maditya!
Just a few tweaks, and please remember to run go generate ./...
as mentioned in step 4 of CONTRIBUTING.md and push (not force-push) the changes to this PR.
We then should be ready for a second LGTM+Approval from any other contributor to this repo before merging.
|
||
// DependencyGraphAutosubmitActionOptions represents the options for the DependencyGraphAutosubmitAction. | ||
type DependencyGraphAutosubmitActionOptions struct { | ||
LabeledRunners bool `json:"labeled_runners,omitempty"` |
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.
LabeledRunners bool `json:"labeled_runners,omitempty"` | |
LabeledRunners *bool `json:"labeled_runners,omitempty"` |
// GitHub API docs: https://docs.github.com/en/rest/code-security/configurations#get-the-code-security-configuration-associated-with-a-repository | ||
// | ||
//meta:operation GET /repos/{owner}/{repo}/code-security-configuration | ||
func (s *OrganizationsService) GetCodeSecurityConfigurationForRepository(ctx context.Context, org string, repo string) (*RepositoryCodeSecurityConfiguration, *Response, error) { |
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.
func (s *OrganizationsService) GetCodeSecurityConfigurationForRepository(ctx context.Context, org string, repo string) (*RepositoryCodeSecurityConfiguration, *Response, error) { | |
func (s *OrganizationsService) GetCodeSecurityConfigurationForRepository(ctx context.Context, org, repo string) (*RepositoryCodeSecurityConfiguration, *Response, error) { |
@gmlewis Thanks!
Any idea how to address it? Doesn't seem related to the new API. |
Hmmm... a lot more files changed than I expected. We have two options:
I think option 1 is probably better since option 2 may take a while, and I'm currently monitoring a hurricane locally. |
Done. Note that
|
That is really strange.
I'm going to make a new branch locally with just your changes to your two files and run |
Ah, I see what is going on now. You are adding support for new operations not yet defined in our local OpenAPI yaml. This section in CONTRIBUTING.md is pertinent to you:
|
EDIT: I've gone ahead and created #3322 which you should be able to merge into your PR (from master It looks like (in addition to the code generation), the tests need to have more coverage by using existing test helper methods like |
thanks! |
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, @maditya !
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
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, @tomfeigin ! |
This PR implements Code Security Configurations APIs as defined at https://docs.github.com/en/rest/code-security/configurations?apiVersion=2022-11-28
Fixes #3211