Repository navigation
fix: gh tool targets the checkout's own GitHub repo - #99
Merged
Merged
Conversation
Dogfood finding (2026-09-18): GhTool's --repo was hardcoded to codecoradev/tole at registration, so running tole in ANY other project made gh issue/pr ops act on the wrong repository. The CLI now asks the checkout itself (git config remote.origin.url) and derives owner/name — https/ssh/URL-suffix forms, strict charset, leading-dash refused. Falls back to codecoradev/tole when there is no GitHub origin. Applied to both registry builders (interactive CLI and MCP server mode); URL parser + real-checkout detection covered by tests.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Oct 7, 2026
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.
What
The gh tool's fixed
--repois now derived from the checkout'sremote.origin.url(https/ssh/URL forms, strict charset validation, leading-dash refused), falling back tocodecoradev/tolewhen undetectable. Applied to both registry builders.Why
Dogfood finding from the integration-surfaces work: running tole in any project other than the tole checkout made gh issue/pr ops act on the wrong repository — a hardcoded default the scan had flagged and a live mission confirmed.
Changes
github_repo_from_remote_url(pure, unit-tested URL parser)detect_github_repo(git config lookup, 5s ceiling, shell-tools gated)GhToolregistration sites use the detected repoTesting