Repository navigation
fix: download the preview cask from the release URL, not the rate-limited asset API - #11
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The preview cask downloaded through the REST asset API (
api.github.com/…/releases/assets/ID). Anonymous API calls are limited to 60 an hour per IP, so installs fail with HTTP 403 on shared IPs: it happened twice on GitHub runners this week, and would hit people on campus, office or VPN networks. Switch to the release's browser URL, which has no such limit, with the same checksum.distribution/homebrew/scripts/validate.py: the preview template/cask must use the browser URL and no asset ID.test_preview_release.py: covers the new URL, noapi.github.com, no leftover placeholders, and rejects bad versions.docs/preview-releases.md: explains the change. The APIcurlline stays as a manual fallback.Homebrew's online audit rejects casks whose URL names a GitHub prerelease (
SharedAudits.github_release). The old API URL only avoided that check by accident. The tap PR addscontextlens-previewto itsaudit_exceptions/github_prerelease_allowlist.json, the mechanism homebrew-cask uses for its own beta casks.The unnotarized stable template (
contextlens-unnotarized.rb.in) still uses the asset API. It isn't published yet and targets non-prereleases, so it is left for a separate change.Evidence
python3 -m unittest discover -s scripts/tests: 82 OK (2 skipped).validate.py, link check and publication audit: 0 findings.Merge Danger
Door: two-way
Blast Radius: release tooling and docs. Takes effect for users only through the tap PR. Merge both together.