Repository navigation
Add repo secret example using libsodium - #1626
Conversation
…b repo for use in github actions. It is usable as a cli package to produce a secret in a given repo that the user owns. usage is main creates a new secret in github for a given owner/repo based on a secretName passed in as an arg and a github token, and secret value provided via the environment usage: export GITHUB_AUTH_TOKEN=<auth token from github that has secret create rights> export SECRET_VARIABLE=<secret value of the secret variable> go run main.go -owner <owner name> -repo <repository name> SECRET_VARIABLE ex: export GITHUB_AUTH_TOKEN=0000000000000000 export SECRET_VARIABLE="my-secret" go run main.go -owner google -repo go-github SECRET_VARIABLE Once it runs go to the github repository > settings > left side options bar > Secrets And you should see the new secret appear there.
Codecov Report
@@ Coverage Diff @@
## master #1626 +/- ##
==========================================
+ Coverage 68.04% 68.09% +0.05%
==========================================
Files 97 97
Lines 8830 8863 +33
==========================================
+ Hits 6008 6035 +27
- Misses 1908 1912 +4
- Partials 914 916 +2
Continue to review full report at Codecov.
|
gmlewis
left a comment
There was a problem hiding this comment.
I'm interrupted again, but I'm noticing that your sentences all need to be fully formed ending with periods for the resulting auto-generated go-docs.
I'm going to hold off on further reviewing this PR until some more updates are made so that gives you a chance to catch up. Thanks.
In Go, if two or more successive arguments to a method all have the same type, you can combine them together (which is the recommended idiomatic Go style), so:
func a(b int, c int, d int, e int, h string, i string j string) {}
becomes:
func a(b, c, d, e int, h, i, j string) {}
…ght, and punctuation.
Co-authored-by: Glenn Lewis <[email protected]>
…on in places that were missing.
|
I updated based on all the latest comments, but I will take another look over all the prose to ensure it is punctuated, spelled and cased correctly. |
Co-authored-by: Glenn Lewis <[email protected]>
Co-authored-by: Glenn Lewis <[email protected]>
and moved mention of installing the package dependency to the package level comment.
Thank you again so much for the thoughtful edits @gmlewis! I had my wife (a teacher and much better writer than I) help me rewrite some of my comments to be full sentences that are more clear. I don't believe I have any sentence fragments or missing punctuation! I also made the other update around simplifying the if statement. commit hash of the comment rewrites: 1bc4e4c |
|
@wesleimp Pleased to meet you! Let me know of any improvements I can make and I will try to do so as speedily as possible! |
|
@wesleimp let me know if there is anything I can do to help in your code review! Thank you again for taking the time and I hope everything is going well with you. |
|
Thank you!! 😄 |
|
Totally understand @wesleimp I really appreciate you taking the time! I know it is in short supply for us all! Is there anything else I need to do prior to this being merged or are we at the end? |
Added a new Example using libsodium to create a new secret in a github repo for use in github actions.
It is usable as a cli package to produce a secret in a given repo that the user owns.
usage is
main creates a new secret in github for a given owner/repo based on a secretName passed in as an arg
and a github token, and secret value provided via the environment
usage:
export GITHUB_AUTH_TOKEN=
export SECRET_VARIABLE=
go run main.go -owner -repo SECRET_VARIABLE
ex:
export GITHUB_AUTH_TOKEN=0000000000000000
export SECRET_VARIABLE="my-secret"
go run main.go -owner google -repo go-github SECRET_VARIABLE
Once it runs go to the github repository > settings > left side options bar > Secrets
And you should see the new secret appear there.