-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
feat: Use org and url from tokens #1673
Conversation
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.
nice! Can't comment too much on the rust code, but logic seems great to me 👍 LMK once this has been released somehow, then I can update the bundler plugins to use this as well 🚀
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.
LGTM! Can we maybe get some integration tests around value mismatches?
You mean |
Yup. It should be trivial to get them going with env vars |
Don't even need env vars, unless you think I should explicitly try those as well. |
The flow works like this:
configure_args
andConfig::from_file
, we read the token first. If it's an org token, we attempt to parse it and save the containedorg
andurl
. A malformed org token results in an error.url
ororg
(inConfig::from_file
,Config::get_org
,Config::set_base_url
), we check if we already have them from the token. If we do and the two values disagree, that's an error.