Skip to content

fix: use ****** format for GitHub API auth in fetch.ts#304889

Draft
Copilot wants to merge 2 commits intoeli/update-stylingfrom
copilot/fix-github-actions-workflow-one-more-time
Draft

fix: use ****** format for GitHub API auth in fetch.ts#304889
Copilot wants to merge 2 commits intoeli/update-stylingfrom
copilot/fix-github-actions-workflow-one-more-time

Conversation

Copy link
Contributor

Copilot AI commented Mar 25, 2026

The core-ci build task was failing with HTTP 403 on all GitHub API requests to download built-in extensions (ms-vscode.js-debug, ms-vscode.js-debug-companion, ms-vscode.vscode-js-profile-table).

Root Cause

build/lib/fetch.ts was constructing the Authorization header incorrectly:

// Before — encodes only the token; GitHub Basic auth requires base64(username:password)
ghApiHeaders.Authorization = 'Basic ' + Buffer.from(process.env.GITHUB_TOKEN).toString('base64');

Without a username: prefix, GitHub can't parse the credential and rejects the request with 403. The error message in the logs ("you may be rate limited") is added by the fetch wrapper whenever it sees a 403, masking the real cause.

Fix

// After — correct OAuth2 ****** for GitHub Actions tokens and PATs
ghApiHeaders.Authorization = 'Bearer ' + process.env.GITHUB_TOKEN;

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/microsoft/vscode/actions/jobs/68598610598/logs
    • Triggering command: /usr/bin/gh gh api repos/microsoft/vscode/actions/jobs/68598610598/logs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Fix the failing GitHub Actions workflow "Code OSS / Compile & Hygiene (pull_request)".
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 68598610598
Job URL: /microsoft/vscode/actions/runs/23560432186/job/68598610598?pr=304877


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow 'Code OSS / Compile & Hygiene' fix: use ****** format for GitHub API auth in fetch.ts Mar 25, 2026
Copilot AI requested a review from eli-w-king March 25, 2026 20:30
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