Skip to content

fix: Use raw GitHub URL for public repositories#72

Merged
Mrtenz merged 1 commit into
mainfrom
mrtenz/use-raw-url-for-public-repos
Jun 10, 2026
Merged

fix: Use raw GitHub URL for public repositories#72
Mrtenz merged 1 commit into
mainfrom
mrtenz/use-raw-url-for-public-repos

Conversation

@Mrtenz

@Mrtenz Mrtenz commented Jun 10, 2026

Copy link
Copy Markdown
Member

Explanation

PR #68 switched all .nvmrc and yarn.lock downloads to use gh api so the action would work for private repositories. However, gh api counts against the GitHub REST API rate limit, which is much lower than the unauthenticated CDN that serves raw.githubusercontent.com. Heavy users of this action started hitting the rate limit.

This change reintroduces the raw URL path for public repositories. Private and internal repositories continue to use gh api to authenticate. The branch is selected based on github.event.repository.visibility, which returns public, private, or internal — anything other than public falls back to gh api.


Note

Cursor Bugbot is generating a summary for commit 8229314. Configure here.

Public repositories now download .nvmrc and yarn.lock directly from
raw.githubusercontent.com (served by a CDN), while private and internal
repositories continue to use `gh api`. This avoids the GitHub REST API
rate limit that was being hit when always using `gh api`.
@Mrtenz

Mrtenz commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

Tested in the extension repository here and in a private repository.

@Mrtenz Mrtenz marked this pull request as ready for review June 10, 2026 14:52
@Mrtenz Mrtenz requested a review from a team as a code owner June 10, 2026 14:52
@Mrtenz Mrtenz merged commit 97365b5 into main Jun 10, 2026
35 checks passed
@Mrtenz Mrtenz deleted the mrtenz/use-raw-url-for-public-repos branch June 10, 2026 15:07
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.

3 participants