Fix GitHub Enterprise host handling#70
Fix GitHub Enterprise host handling#70Mariangeles-2025 wants to merge 2 commits intoAzure-Samples:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the setup/authentication flow in doctor.sh to better support GitHub Enterprise by making the GitHub host configurable.
Changes:
- Introduces a
GITHUB_HOSTenvironment variable (defaulting togithub.com). - Passes the configured host into
copilot loginvia--host.
Show a summary per file
| File | Description |
|---|---|
doctor.sh |
Adds GITHUB_HOST defaulting and uses it when invoking copilot login. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 2
| MAGENTA='\033[0;35m' | ||
| BOLD='\033[1m' | ||
| NC='\033[0m' # No Color | ||
| #Variable for the GitHub host, defaults to 'github.com |
There was a problem hiding this comment.
The new comment has a typo/incomplete quoting (missing closing ' after github.com) and is missing a space after #, which makes it harder to read and can be confusing about the expected value format for GITHUB_HOST.
| #Variable for the GitHub host, defaults to 'github.com | |
| # Variable for the GitHub host, defaults to 'github.com' |
| echo -e "${BLUE}🔐 Authenticating with GitHub Copilot...${NC}" | ||
| echo "" | ||
| if ! copilot login; then | ||
| if ! copilot login --host "https://${GITHUB_HOST}"; then |
There was a problem hiding this comment.
copilot login --host "https://${GITHUB_HOST}" will produce an invalid URL if GITHUB_HOST is provided with a scheme already (e.g., https://ghe.example.com → https://https://...). Consider normalizing GITHUB_HOST (accept either hostname or full URL) before building the --host argument, and reuse the same host for the PAT instructions URL in this setup flow so GitHub Enterprise users aren’t directed to github.com.
Review Summary for PR #70Overall
Build & Test Result
Code Changes Applied
Acceptance Criteria Coverage
Observations
|
- Fix comment typo (space after #, closing quote) - Add scheme-stripping for GITHUB_HOST to prevent double-scheme bug - Update PAT URL to use GITHUB_HOST for GHE support - Remove extra blank line
|
@Mariangeles-2025 please test it again with the changes in your environment (as I cannot reproduce it) |
No description provided.