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
Put secrets on github organizations #3567
Conversation
please sign the dco |
a761c16
to
1f7d9d2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3567 +/- ##
==========================================
+ Coverage 40.10% 40.41% +0.31%
==========================================
Files 155 155
Lines 10044 10087 +43
==========================================
+ Hits 4028 4077 +49
+ Misses 5530 5517 -13
- Partials 486 493 +7 ☔ View full report in Codecov by Sentry. |
@cpanato should be signed now |
@cpanato can you approve the flows again? I had a lint issue |
just noticed that the lint check failed again, however this doesn't seem to be related with my changes since its failing on prepare environment |
@fnxpt please take a look at https://github.com/sigstore/cosign/pull/3567/files#annotation_18715975046 |
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.
see my comment
@cpanato its weird I had it without the else and got errors on the lint... anyways Im going to revert that change |
Not really sure why lint keeps complicating, I will try to run it locally but if you have any clues let me know |
please rebase and see if that fix it |
6e041c7
to
ba270a5
Compare
@cpanato rebase done |
@cpanato runned lint locally and manage to find the issue... I hope now it works (still no clues why its giving a lot of errors on the prepare phase) |
looks ok now |
pkg/cosign/git/github/github.go
Outdated
@@ -145,6 +151,20 @@ func (g *Gh) PutSecret(ctx context.Context, ref string, pf cosign.PassFunc) erro | |||
return nil | |||
} | |||
|
|||
func (g *Gh) getPublicKey(ctx context.Context, client *github.Client, owner string, repo string) (*github.PublicKey, *github.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.
sorry, I would like to understand why you are doing the (g *Gh).
What is the benefit of doing that and not using a internal pure function?
func (g *Gh) getPublicKey(ctx context.Context, client *github.Client, owner string, repo string) (*github.PublicKey, *github.Response, error) { | |
func getPublicKey(ctx context.Context, client *github.Client, owner string, repo string) (*github.PublicKey, *github.Response, error) { |
same for the other one
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.
if the g
had the github client that makes more sense, but it does not have, and you are passing as paramenter, i think you can drop the g thing
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.
no reason at all, I converted the methods to functions... initially I duplicated the original function and they I cleaned the code to avoid duplicated code and I ended up by leaving this as a method
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.
functions are ok, but that does not need to be part of (g *Gh)
please drop that
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.
check my comment, otherwise lgtm
e4ef641
to
0db4cda
Compare
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.
thanks
e2e tests are failing |
0db4cda
to
b1638a7
Compare
rebase done |
seems like the tests are still failing.... but it doesnt seem to be from the code |
@cpanato any update/guidance on this? |
Hey guys any inputs on this? From the logs this doesn't look like an issue with the code |
Can you rebase off HEAD and we'll try to run them again? |
Signed-off-by: Marlon Pina Tojal <marlont@backbase.com>
Signed-off-by: Marlon Pina Tojal <marlont@backbase.com>
Signed-off-by: Marlon Pina Tojal <marlont@backbase.com>
Signed-off-by: Marlon Pina Tojal <marlont@backbase.com>
b1638a7
to
00ae247
Compare
@haydentherapper rebased |
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.
thx
closes #3566
Summary
Currently is only possible to set secrets on a repo, adding the possibility to set it in an organization is pretty useful, since it allows to control secrets per organization instead of adding multiple secrets to individual repos.
Release Note
Allows secret creation on github organizations