Skip to content

fix(mcp): parse http and git protocol GitHub remotes - #2107

Closed
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:fix/mcp-parse-extra-github-remotes
Closed

fix(mcp): parse http and git protocol GitHub remotes#2107
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:fix/mcp-parse-extra-github-remotes

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • Teach parseGitRemote to accept git://github.com/owner/repo and http://github.com/owner/repo remotes.
  • Lets local MCP preflight infer repoFullName without --repo for legacy URL shapes.

No-issue rationale

MCP remote parsing hardening with no linked issue.

Test plan

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

Made with Cursor

Support legacy git:// and plain http:// GitHub remote URLs so local MCP
preflight can infer repoFullName without an explicit --repo override.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (704cebc) to head (6ede3f4).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #2107       +/-   ##
==========================================
- Coverage   95.71%       0   -95.72%     
==========================================
  Files         222       0      -222     
  Lines       24620       0    -24620     
  Branches     8936       0     -8936     
==========================================
- Hits        23565       0    -23565     
+ Misses        432       0      -432     
+ Partials      623       0      -623     

see 222 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb

loopover-orb Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-01 11:42:53 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
The change extends `parseGitRemote` by adding explicit `http:​//github.com/...` and `git:​//github.com/...` patterns alongside the existing SSH/HTTPS forms, and the unit test covers the new `.git`-suffixed cases. The implementation is narrowly scoped and reuses the existing normalization path, so the visible diff is safe to proceed. The main maintainability issue is that the regex list now repeats the same owner/repo capture shape across several protocol variants.

Nits — 6 non-blocking
  • nit: packages/gittensory-mcp/lib/local-branch.js:16 the protocol-specific regex list now duplicates the same GitHub owner/repo capture shape, which makes future remote-shape changes easier to miss.
  • nit: test/unit/local-branch.test.ts:1762 the new protocol coverage only exercises the `.git` suffix path; add no-suffix and trailing-slash cases if these protocols are intended to have parity with the HTTPS normalization cases above.
  • packages/gittensory-mcp/lib/local-branch.js:16 consider consolidating the HTTP(S) cases into a single `^https?:\/\/github\.com\/...` pattern and the git protocol into the same protocol-group style if you want this parser to stay compact.
  • test/unit/local-branch.test.ts:1762 add `http:​//github.com/JSONbored/gittensory/` and `git:​//github.com/JSONbored/gittensory/` expectations to lock the new protocols to the same trimming behavior already asserted for HTTPS.
  • 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: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 2833 registered-repo PR(s), 1581 merged, 51 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 2833 PR(s), 51 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: TypeScript, C++, HTML, MDX, Rust
  • Official Gittensor activity: 2833 PR(s), 51 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Await review-lane availability.
  • 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

@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 1, 2026

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix these blockers and resubmit:

The main maintainability issue is that the regex list now repeats the same owner/repo capture shape across several protocol variants.

@JSONbored JSONbored closed this Jul 1, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 1, 2026
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