-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Adds the ability to list environment secrets - gh secret list -e dev #3270
Adds the ability to list environment secrets - gh secret list -e dev #3270
Conversation
Since this is just adding to the list command, we should probably also consider adding environment secret handling to the other gh secret commands. |
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 looks great! I think it can even be simplified.
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.
Ignore for now, I need to fix the unit tests |
This should be ready for review again. Sorry it took so long, life happens... |
@mislav Is there anything else you would like changed to get this wrapped up? |
Co-authored-by: Mislav Marohnić <mislav@github.com>
1dea319
to
e5bdaaa
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 for the updates, and sorry for the late reply. The changeset looked good, but the bit with fetching the repository ID was over-complicated. The API allows us to query environment secrets without knowing the numeric repo ID. I've pushed a simplification.
@mislav Thanks a ton! Glad to contribute and get this pushed through. |
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.
approved
First time contributor here, so excuse me if I missed anything in the guidelines.
This fixes #3265
Environment Secrets are not included in gh secret list. This adds a new flag to gh secret list called env (-e) which takes in a string that correlates with your environment secrets name. The output is the same as gh secret list, but it only includes the environment secrets.
Here is the command and the output:
This is just a draft because I'm sure I'm missing things and I would lo have some guidance.