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

Reversing priority of token and endpoint environment variables #16

Closed
millette opened this issue Apr 9, 2016 · 4 comments
Closed

Reversing priority of token and endpoint environment variables #16

millette opened this issue Apr 9, 2016 · 4 comments

Comments

@millette
Copy link

millette commented Apr 9, 2016

Started as a line comment but let's make it an issue and fix/close it.

The readme says clearly:

Can be overridden globally with the GITHUB_TOKEN environment variable.

Same for the endpoint.

Not sure what the logic was, but I think it would be preferable to use the environment variables only when no applicable argument is passed. An application could have a default token (the env.) but for whatever reason use another token on specific calls.

The module, readme and test would have to be updated. It could be considered a major change since it's reversing its meaning.

@sindresorhus
Copy link
Owner

Makes sense to me.

@floatdrop @SamVerschueren Thoughts?

@SamVerschueren
Copy link
Contributor

Makes sense to me as well. The options object has higher priority then other global settings.

@floatdrop
Copy link
Contributor

Yep, options should not be overridden by globals.

@sindresorhus
Copy link
Owner

Alright. Let's do it. PR welcome.

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

No branches or pull requests

4 participants