Skip to content

fix(mcp): parseGitRemote accepts trailing-slash GitHub URLs - #1887

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:fix/mcp-parse-git-remote-trailing-slash
Jun 30, 2026
Merged

fix(mcp): parseGitRemote accepts trailing-slash GitHub URLs#1887
JSONbored merged 1 commit into
JSONbored:mainfrom
kiannidev:fix/mcp-parse-git-remote-trailing-slash

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Strip trailing slashes from origin remotes before parsing so https://github.com/owner/repo/ resolves correctly in MCP local-branch metadata

Test plan

  • npx vitest run test/unit/local-branch.test.ts -t "parses remotes"

Strip trailing slashes before matching origin remotes so local branch
metadata works with common https://github.com/owner/repo/ remotes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev requested a review from JSONbored as a code owner June 30, 2026 18:13
@dosubot dosubot Bot added the size:XS label Jun 30, 2026
@loopover-orb

loopover-orb Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-06-30 19:23:57 UTC

2 files · 1 AI reviewer · no blockers · readiness 66/100 · CI green · unknown

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
The change normalizes the remote string before pattern matching, which fixes the described HTTPS trailing-slash case without changing the existing owner/repo extraction logic. Because the slash stripping happens before both supported remote patterns, it also consistently handles trailing slashes for SSH-style remotes. The added unit assertion covers the reported regression path, and the visible diff is small and coherent with the PR description.

Nits — 4 non-blocking
  • nit: test/unit/local-branch.test.ts:1679 only covers the plain HTTPS trailing-slash case; adding `https:​//github.com/JSONbored/gittensory.git/` would lock down the common clone-URL variant affected by the same normalization.
  • packages/gittensory-mcp/lib/local-branch.js:8 is fine as a shared pre-normalization step; keep it there rather than patching only the HTTPS regex so SSH remotes get the same behavior.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (size label size:XS; no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR; address the blocker before review.
Contributor workload ✅ 10/10 Author activity: 3148 registered-repo PR(s), 1801 merged, 53 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 3148 PR(s), 53 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 3148 PR(s), 53 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Fix the blocker.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@dosubot dosubot Bot added the lgtm label Jun 30, 2026
@JSONbored
JSONbored merged commit 4e34c4b into JSONbored:main Jun 30, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 30, 2026
@github-actions github-actions Bot mentioned this pull request Jul 1, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants