Skip to content

fix: support private GitHub repos#6

Merged
tehw0lf merged 3 commits into
mainfrom
fix/workflow-permissions-pull-requests
Apr 19, 2026
Merged

fix: support private GitHub repos#6
tehw0lf merged 3 commits into
mainfrom
fix/workflow-permissions-pull-requests

Conversation

@tehw0lf
Copy link
Copy Markdown
Owner

@tehw0lf tehw0lf commented Apr 19, 2026

Summary

  • GitHub's signed download_url for private repos includes an access token as a query param — sending an Authorization header alongside it triggers a CORS preflight on raw.githubusercontent.com that gets blocked with 403
  • Fix: always fetch download_url without auth headers; the signed token in the URL is sufficient for both public and private repos
  • Added url field to GhFile interface and a fallback path for the rare case where download_url is null (fetches via API endpoint + base64 decode)

Test plan

  • Public repo without token still loads correctly
  • Public repo with token still loads correctly
  • Private repo with token now loads all workflows (previously CORS 403)

tehw0lf added 3 commits April 13, 2026 17:57
…oad_url

GitHub's signed download_url for private repos already includes an access
token as a query param. Sending an Authorization header alongside it triggers
a CORS preflight on raw.githubusercontent.com that gets blocked with 403.
Fall back to the API url + base64 decode only when download_url is null.
* Bumped version from 1.0.3 to 1.0.4 in both package.json and package-lock.json
* Ensures consistency across project files
@tehw0lf tehw0lf merged commit 9716e55 into main Apr 19, 2026
18 checks passed
@tehw0lf tehw0lf deleted the fix/workflow-permissions-pull-requests branch April 19, 2026 20:01
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.

1 participant