-
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 support for Dependabot secrets #2248
Conversation
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, @liath !
Please add unit tests for the new methods.
github/actions_secrets.go
Outdated
return s.getPublicKey(ctx, url) | ||
} | ||
|
||
// GetRepoDependabotPublicKey gets a public key that should be used for secret encryption. |
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.
Maybe a more specific description for this endpoint would be good?
Codecov Report
@@ Coverage Diff @@
## master #2248 +/- ##
==========================================
+ Coverage 97.80% 97.81% +0.01%
==========================================
Files 113 114 +1
Lines 10207 10265 +58
==========================================
+ Hits 9983 10041 +58
Misses 156 156
Partials 68 68
Continue to review full report at Codecov.
|
Slightly bike-sheddy, but I would suggest pulling this out of |
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.
This is looking great, @liath - thank you!
Just a couple minor tweaks and then I think we will be ready for a second LGTM/Approval before merging.
Note that any other contributor to this repo can review and give the second LGTM/Approval. Thank you!
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.
Oh, one more thing... since the new methods are part of the ActionsService
, can you please rename the new files to actions_dependabot_secrets.go
and actions_dependabot_secrets_test.go
? Thank you!
…vice and update CC dates
Done! That feels much nicer, good suggestion :D |
Could we go a step further and make them |
Genius! Sorry I didn't think of that the first time, @liath ! |
Not super familiar with this project, but I do work on Dependabot (and implemented the API in question) and so I'm curious why this is part of the No strong opinion either way, confident y'all do what makes most sense for this project 👍 |
Hi @jurre and thank you for the comments and questions (and for the API! 😄 )! So in this repo, we try to tightly couple the layout and services to the GitHub v3 API documentation organization structure. We initially placed these API endpoints under the However, now that the API documentation exists and is indeed under a completely different section, I think you are right that we should create a new @liath - would you like to tackle that, or should we address that in a follow-up PR (either by you or by another contributor)? |
You're right, that's definitely the case 👍 they share a lot of the same semantics, but might evolve separately
Yeah it took a few days to get those published so that's totally fair. |
Should I add Dependabot specific types like |
I think we can keep the shared data structs for now (even though we are separating out the service)... with the understanding that if they diverge in the future, we can split it further. |
And just to be clear, I think we can keep all that nice work you did to consolidate the shared code... again with the understanding that it may change some day, but I think it is super-clean for now, which is very nice. |
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.
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, @Parker77 ! |
I added handling for Dependabot specific secrets per #2246. This part of the API seems undocumented, but I don't see why it would change as it's almost identical to managing regular secrets. This file is pretty repetitive, and I doubled the number of repo and org methods, so I did some refactoring. Hopefully nothing too heinous.