Skip to content

Conversation

@andyfeller
Copy link
Member

Following on the heels of #151, this commit exports the internal logic used to determine if a host is GHES deployment or a tenant.

Exporting these functions allow extension authors like github/gh-copilot to provide tailored experiences consistently with gh.

Following on the heels of #151, this commit exports the internal logic used to
determine if a host is GHES deployment or a tenant.

Exporting these functions allow extension authors like `github/gh-copilot` to
provide tailored experiences consistently with `gh`.
@andyfeller andyfeller requested a review from williammartin March 8, 2024 15:08
@andyfeller andyfeller enabled auto-merge March 8, 2024 15:08
This aligns the `cli/cli` behavior of IsTenancy and IsEnterprise with the counterparts here.
@andyfeller
Copy link
Member Author

From @williammartin:

With the addition of normalizeHostname to IsTenancy and IsEnterprise it looks like maybe there could be a few more test cases like api.tenant.ghe.com or api.github.com or api.github.localhost

Including API cases for tenancy checks, ensuring that hosts are normalized.
Adding API hosts to TestIsEnterprise to ensure that normalized hosts work as expected.
Copy link
Member

@williammartin williammartin left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@andyfeller andyfeller merged commit 5840c44 into trunk Apr 29, 2024
@andyfeller andyfeller deleted the andyfeller/export-auth-is-tenancy branch April 29, 2024 12:24
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.

2 participants