fix(compute): strip the .git suffix before GitHub REST API lookups - #106
Merged
Conversation
The git reverse proxy forwards the raw repo path segment into Minter::mint, but the REST API rejects git's repo.git remote spelling, so any fetch/push from a standard clone (including the seeded /workspace repos) failed with a 500. Normalize in mint, matching the stripping parse_remote already does for remote-URL callers. Fixes #105 Co-Authored-By: Claude Fable 5 <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.
The git reverse proxy forwards the raw repo path segment into
Minter::mint, but the GitHub REST API rejects git'srepo.gitremote spelling, so any fetch/push from a standard clone — including the snapshot-seeded/workspacerepos — failed with a 500 (GitHub installation lookup for smoketurner/devbox.git failed (404)).mintnow normalizes the repo name with abare_repohelper shared withparse_remote(which already stripped the suffix for remote-URL callers). The smart-HTTP upstream URL keeps the client's spelling, which GitHub accepts.Server-side only — deploys with the service, no agent release or AMI rebuild needed.
Fixes #105
🤖 Generated with Claude Code
Note
Low Risk
Small, localized change to repo name normalization before existing GitHub API calls; no auth model or proxy URL behavior changes beyond fixing the 404 case.
Overview
Fixes GitHub App token minting when the git reverse proxy passes repository path segments that still include the
.gitsuffix.Minter::mintnow normalizes the repo name with a sharedbare_repohelper before installation lookup and token exchange, so REST calls useowner/repoinstead ofowner/repo.git(which GitHub rejects with 404).parse_remoteuses the same helper instead of inline suffix stripping, keeping remote-URL and proxy callers consistent. Unit tests coverbare_repoedge cases. Smart-HTTP upstream URLs are unchanged and can keep the client’s spelling.Reviewed by Cursor Bugbot for commit bc215f7. Bugbot is set up for automated code reviews on this repo. Configure here.