Skip to content

fix: send required GitHub API headers#7

Merged
Quantumlyy merged 1 commit into
mainfrom
fix/github-api-headers
May 18, 2026
Merged

fix: send required GitHub API headers#7
Quantumlyy merged 1 commit into
mainfrom
fix/github-api-headers

Conversation

@Quantumlyy
Copy link
Copy Markdown
Member

Summary

  • Add required GitHub REST API headers, including User-Agent, to OAuth user detail requests.
  • Log sanitized GitHub /user failure details to make future OAuth callback 502s diagnosable.
  • Cover the OAuth callback path with a test that verifies the GitHub API request headers.

Verification

  • pnpm test in apps/gateway
  • pnpm build in apps/gateway

Created with Constructor

Copilot AI review requested due to automatic review settings May 18, 2026 12:42
@Quantumlyy Quantumlyy merged commit 587b175 into main May 18, 2026
1 check failed
@Quantumlyy Quantumlyy deleted the fix/github-api-headers branch May 18, 2026 12:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the gateway OAuth callback path by adding GitHub REST API headers to user-detail requests and adding coverage to verify those headers are sent.

Changes:

  • Adds shared GitHub API headers for /user and /user/emails fetches.
  • Logs bounded GitHub /user failure details for diagnosability.
  • Adds an OAuth callback test that verifies GitHub API request headers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/gateway/src/auth.ts Adds GitHub API headers and failure logging in the OAuth callback user fetch path.
apps/gateway/test/index.spec.ts Adds a mock OAuth callback test covering GitHub API headers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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