Skip to content

Adds the ability to list environment secrets - gh secret list -e dev#3270

Merged
mislav merged 1 commit intocli:trunkfrom
tylerxwright:feature/issue-3265-implement-gh-secret-list-env
May 31, 2021
Merged

Adds the ability to list environment secrets - gh secret list -e dev#3270
mislav merged 1 commit intocli:trunkfrom
tylerxwright:feature/issue-3265-implement-gh-secret-list-env

Conversation

@tylerxwright
Copy link
Contributor

@tylerxwright tylerxwright commented Mar 20, 2021

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:
image

This is just a draft because I'm sure I'm missing things and I would lo have some guidance.

@tylerxwright
Copy link
Contributor Author

Since this is just adding to the list command, we should probably also consider adding environment secret handling to the other gh secret commands.

Copy link
Contributor

@mislav mislav left a 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.

Copy link

@curtcurt871 curtcurt871 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tylerxwright tylerxwright requested a review from mislav March 29, 2021 12:56
@tylerxwright tylerxwright marked this pull request as ready for review March 29, 2021 12:56
@tylerxwright
Copy link
Contributor Author

Ignore for now, I need to fix the unit tests

@tylerxwright
Copy link
Contributor Author

This should be ready for review again. Sorry it took so long, life happens...

@tylerxwright
Copy link
Contributor Author

@mislav Is there anything else you would like changed to get this wrapped up?

@mislav mislav self-assigned this Apr 22, 2021
Co-authored-by: Mislav Marohnić <mislav@github.com>
@mislav mislav force-pushed the feature/issue-3265-implement-gh-secret-list-env branch from 1dea319 to e5bdaaa Compare May 31, 2021 19:16
Copy link
Contributor

@mislav mislav left a 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 mislav merged commit 6bb34cf into cli:trunk May 31, 2021
@tylerxwright
Copy link
Contributor Author

@mislav Thanks a ton! Glad to contribute and get this pushed through.

Copy link

@Jgblackb83 Jgblackb83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for environment secrets

5 participants