Skip to content
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

Support environment variables for git token #1008

Closed
orhun opened this issue Sep 30, 2023 · 3 comments · Fixed by #1026
Closed

Support environment variables for git token #1008

orhun opened this issue Sep 30, 2023 · 3 comments · Fixed by #1026
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@orhun
Copy link
Contributor

orhun commented Sep 30, 2023

Motivations

e.g. I would like to use GITHUB_TOKEN variable instead of passing the token via --git-token.

  • Would you like to implement this feature? [y/n]

y

Solution

Use env directive of clap to support environment variables for certain arguments.

Alternatives

None.

Additional context

Thanks for creating release-plz!

@orhun orhun added the enhancement New feature or request label Sep 30, 2023
@MarcoIeni
Copy link
Owner

Makes sense. Should we call it GIT_TOKEN instead of GITHUB_TOKEN?
My reasoning is that release-plz also supports gitea.

@MarcoIeni MarcoIeni added the good first issue Good for newcomers label Oct 7, 2023
@orhun orhun changed the title Support environment variables for arguments Support environment variables for git token Oct 7, 2023
orhun added a commit to orhun/release-plz that referenced this issue Oct 7, 2023
@orhun
Copy link
Contributor Author

orhun commented Oct 7, 2023

In #1026, I added env directive only to the git token. Let me know if you think we can also add it to the other arguments. With a glance look, I think this should be enough/feasible though.

@MarcoIeni
Copy link
Owner

Yes, the PR looks good, thanks ❤️

@release-plz release-plz bot mentioned this issue Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants