fix(sweep): repo-detection fallback regex also accepts ssh:// github remotes - #2504
Merged
Merged
Conversation
…remotes The two-pass sed fallback only matched git@github.com: and https://github.com/ remote URL forms, silently rejecting the valid ssh://git@github.com/owner/repo form that the old, more permissive regex used to accept. Mirrors the same fix already applied to /resolve's copy of this pattern (PR #2362). Closes #2363 docs check acknowledged
Contributor
Greptile SummaryThis PR extends
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The new anchored regex alternative captures the same owner/repository slug shape as the existing HTTPS form, while the following pipeline stage continues to remove an optional Important Files Changed
Reviews (1): Last reviewed commit: "fix(sweep): repo-detection fallback rege..." | Re-trigger Greptile |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
/sweep's repo-slug-detection fallback (.claude/skills/sweep/SKILL.md) only matchesgit@github.com:owner/repoandhttps://github.com/owner/reporemote URL forms — it silently rejectsssh://git@github.com/owner/repo, a valid, real-world GitHub remote form. The OLD (buggy,.git-suffix-retaining) regex this replaced happened to accept it too, via a permissive.*github\.com[:/]prefix — so this is a genuine regression, not just a pre-existing gap.Greptile caught this exact gap on PR #2362 (porting the same fallback pattern into
/resolve) and it was fixed there before merge./sweep— the original source of this pattern (PR #2185) — still has the unfixed version.Fix
Add
ssh://git@github\.com/as a third alternative in the anchored prefix group, exactly matching/resolve's already-fixed copy:Closes #2363
Test plan
ssh://, each with/without.gitsuffix) resolve to the correctowner/reposlug via the fixed regexlint-skill.shshows only pre-existing warnings/errors unrelated to this line (missing frontmatter fields, missing sections — out of scope, not introduced by this change)/resolvewith no accompanying test) — matches existing precedent