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

Namespace API tokens to eliminate name collision #294

Closed
mainrs opened this issue Feb 3, 2021 · 3 comments · Fixed by #296
Closed

Namespace API tokens to eliminate name collision #294

mainrs opened this issue Feb 3, 2021 · 3 comments · Fixed by #296

Comments

@mainrs
Copy link
Contributor

mainrs commented Feb 3, 2021

Hey!

I have an old CLI tool installed that also assumes that I have an environment variable named PRIVATE_TOKEN set. It would be awesome if this CLI would namespace the variable, for example ALL_CONTRIBUTORS_PRIVATE_TOKEN (or even with Gitlab and GitHub specific variants but that would be out of scope for now). This would eliminate namespace conflicts.

This can be implemented in a backwards-compatible manner. It would first check for the namespaced variant and fallback to the current name.

The namespacing is done in popular CLIs such as npm, diesel and yarn as well, just to name a few.

@mainrs
Copy link
Contributor Author

mainrs commented Feb 5, 2021

I'd be open to create a PR if this would get merged!

@Berkmann18
Copy link
Member

Sounds good to me, a PR would be welcome.

mainrs pushed a commit to mainrs/all-contributors-cli that referenced this issue Feb 11, 2021
This commit adds the possibility to specify the private token via the
ALL_CONTRIBUTORS_PRIVATE_TOKEN environment variable. If the environment
variable is not set it will fall back to the previous behavior and check
for PRIVATE_TOKEN instead.

Closes all-contributors#294
Berkmann18 pushed a commit that referenced this issue Feb 13, 2021
* feat: add namespaced token

This commit adds the possibility to specify the private token via the
ALL_CONTRIBUTORS_PRIVATE_TOKEN environment variable. If the environment
variable is not set it will fall back to the previous behavior and check
for PRIVATE_TOKEN instead.

Closes #294

* style: remove irregular whitespace

* refactor: remove unneeded parenthesis
@all-contributors-release-bot
Copy link
Member

🎉 This issue has been resolved in version 6.20.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

3 participants