formula: use public download URL instead of API URL with auth#3
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Greptile Summary
This PR replaces the authenticated GitHub API asset URL in the Homebrew formula with a standard public release download URL, removing the need for
HOMEBREW_GITHUB_API_TOKENand a separate API call to look up the numeric asset ID.Formula/sgpctl.rb: Drops the API URL (api.github.com/…/releases/assets/<id>) and itsAccept,X-GitHub-Api-Version, andAuthorizationheaders in favour of the conventional public URLhttps://github.com/scaleapi/sgpctl/releases/download/v0.0.1/sgpctl-darwin-arm64..github/workflows/publish-release.yml: Removes thegh apicall that resolved the numeric asset ID and updates thesedreplacement to swap out the version path segment (releases/download/v[^/]*/) directly, which is simpler and more robust.Confidence Score: 5/5
v[^/]*/correctly matches any semver tag with the conventionalvprefix. No logic errors, security issues, or regressions were found.Sequence Diagram
sequenceDiagram participant GH as GitHub Release Event participant WF as publish-release workflow participant Repo as sgpctl repo (main) GH->>WF: release published (TAG) WF->>WF: Validate required assets present WF->>GH: gh release download sgpctl-darwin-arm64 WF->>WF: sha256sum artifact note over WF: sed replaces releases/download/v*/\nwith releases/download/TAG/\n(no API call for asset ID needed) WF->>Repo: commit updated Formula/sgpctl.rb WF->>Repo: open PR & squash-mergeLast reviewed commit: b967fee