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

Add support for garage.github.com #85

Merged
merged 2 commits into from Nov 1, 2022
Merged

Add support for garage.github.com #85

merged 2 commits into from Nov 1, 2022

Conversation

mislav
Copy link
Contributor

@mislav mislav commented Oct 21, 2022

No description provided.

Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

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

Code looks good to me. Kind of odd that the check for garage comes before the call to normalizeHostname(). Not sure if that can/should be rectified.

Additionally, would like to see a test to two for this new behavior.

@mislav
Copy link
Contributor Author

mislav commented Oct 31, 2022

Kind of odd that the check for garage comes before the call to normalizeHostname().

Normalizing the hostname turns garage.github.com into github.com, so it's a bit too late to check for garage afterwards. However, normalizing garage.github.com as github.com elsewhere is beneficial for token reuse: since it's technically not possible to complete the web browser flow gh auth login -h garage.github.com, the regular github.com token will be used for authenticating to garage environment.

@mislav mislav enabled auto-merge (squash) November 1, 2022 18:58
@mislav mislav merged commit 77a4c4f into trunk Nov 1, 2022
@mislav mislav deleted the garage branch November 1, 2022 19:02
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.

None yet

2 participants