Skip to content

fix: use standard GitHub API version in githubHeaders#5

Open
mmazur wants to merge 1 commit into
QLHazyCoder:mainfrom
mmazur:fix/github-api-version
Open

fix: use standard GitHub API version in githubHeaders#5
mmazur wants to merge 1 commit into
QLHazyCoder:mainfrom
mmazur:fix/github-api-version

Conversation

@mmazur
Copy link
Copy Markdown

@mmazur mmazur commented May 9, 2026

Summary

  • githubHeaders() was using the shared API_VERSION constant ("2025-10-01"), which is only valid for Copilot API endpoints
  • Standard GitHub REST API endpoints (e.g. /user) reject this version with HTTP 400, causing "Failed to get user info" errors during the Admin UI device flow
  • Hardcode "2022-11-28" (a supported GitHub REST API version) in githubHeaders() instead

Fixes #4

Testing

Human here, this actually fixed my thing.

The githubHeaders function was sharing the Copilot API_VERSION constant
("2025-10-01"), which is only valid for Copilot endpoints. Standard
GitHub REST API endpoints (like /user) reject this version with HTTP 400.

Use the stable "2022-11-28" version for GitHub REST API calls instead.

Fixes QLHazyCoder#4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wanzhao-ysy
Copy link
Copy Markdown

@QLHazyCoder 请您审核

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.

Failed to get user info

2 participants