fix: verify Copilot subscription access after gh auth login

After a successful gh auth login, call check_copilot_auth() to confirm
the new token actually has Copilot access — not just that a token exists.
Prevents proceeding with an account that has no Copilot subscription.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Jiaxu Liu 2026-03-23 14:45:33 +00:00
parent fcca3236e9
commit 6d53f33df0
1 changed files with 3 additions and 3 deletions

View File

@ -375,11 +375,11 @@ def perform_copilot_oauth() -> bool:
console.print("[red]`gh auth login` failed.[/red]")
return False
if _get_github_token():
console.print("[green]✓ GitHub authentication successful![/green]")
if check_copilot_auth():
console.print("[green]✓ Authenticated with GitHub Copilot[/green]")
return True
console.print("[red]Could not retrieve token after login.[/red]")
console.print("[red]Could not retrieve token or verify Copilot access after login.[/red]")
return False