Skip to content

Conversation

@javoire
Copy link
Owner

@javoire javoire commented Jan 21, 2026

Summary

  • When multiple git remotes are configured, gh CLI may pick the wrong repository for PR operations
  • Now explicitly passes --repo OWNER/REPO derived from the origin remote URL to all gh commands
  • Adds ParseRepoFromURL helper that handles SSH, HTTPS, and GHE URL formats

🤖 Generated with Claude Code

When multiple git remotes are configured, gh CLI may pick the wrong
repository. This fix explicitly passes --repo OWNER/REPO derived from
the origin remote URL to all gh commands.

- Add GetRemoteURL method to git client
- Add ParseRepoFromURL helper to extract OWNER/REPO from git URLs
- Update NewGitHubClient to accept repo parameter
- Update all callers to parse origin URL and pass repo

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@javoire javoire enabled auto-merge January 21, 2026 22:21
@javoire javoire merged commit 995c178 into main Jan 21, 2026
1 check passed
@javoire javoire deleted the fix/pr-fetching-multiple-remotes branch January 21, 2026 22:21
@javoire
Copy link
Owner Author

javoire commented Jan 21, 2026

🎉 This PR is included in version 1.7.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants