Skip to content

fix: find GitHub remote from any remote, not just origin#25955

Open
Waridley wants to merge 1 commit intoanomalyco:devfrom
Waridley:fix/any-gh-remote
Open

fix: find GitHub remote from any remote, not just origin#25955
Waridley wants to merge 1 commit intoanomalyco:devfrom
Waridley:fix/any-gh-remote

Conversation

@Waridley
Copy link
Copy Markdown

@Waridley Waridley commented May 6, 2026

Issue for this PR

Closes #25956

Type of change

  • Bug fix

What does this PR do?

This PR fixes an issue where the GitHub install command only looked at the "origin" remote to find the repository. Now it parses all remotes and finds the first valid GitHub remote URL.

How did you verify your code works?

Installed locally and ran opencode github install in a repo with no origin remote.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Instead of checking only `origin`, this fix searches all remotes for one
that successfully parses as a Github URL.
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

The following comment was made by an LLM, it may be inaccurate:

Based on my search results, there is one potentially related PR:

PR #9323: fix(cli): support SSH aliases when installing opencode GitHub app

Why it's related: This PR also addresses issues with the GitHub install command's handling of remote URLs. While #9323 focuses on SSH alias support, both PRs deal with parsing and handling GitHub remote URLs during the installation process.

The current PR (25955) expands the remote detection to check all remotes rather than just "origin", which complements fixing SSH alias handling in remote URL parsing.

@github-actions github-actions Bot removed needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub install fails when GitHub remote is not named 'origin'

1 participant