Skip to content

If multiple remotes exist but only one is a Github remote, pick it without prompting#5544

Merged
stefanhaller merged 1 commit into
masterfrom
auto-select-single-github-remote
Apr 26, 2026
Merged

If multiple remotes exist but only one is a Github remote, pick it without prompting#5544
stefanhaller merged 1 commit into
masterfrom
auto-select-single-github-remote

Conversation

@stefanhaller

Copy link
Copy Markdown
Collaborator

If the repo has multiple remotes, but only one of them is on Github (the others might for example point to a self-hosted Critic server or something like that), lazygit would still present a menu to choose the remote for pull requests, but it would contain only that single entry. That's pointless, pick it automatically without prompting.

…thout prompting

If the repo has multiple remotes, but only one of them is on Github (the others
might for example point to a self-hosted Critic server or something like that),
lazygit would still present a menu to choose the remote for pull requests, but
it would contain only that single entry. That's pointless, pick it automatically
without prompting.

We add some tests while we're at it; these wouldn't have caught the problem,
because they only test getGithubBaseRemote which already takes the filtered
github remotes. It's still better than not having any tests; the real issue
could only have been caught with an integration test, which we don't bother
adding.
@stefanhaller stefanhaller added the bug Something isn't working label Apr 26, 2026
@stefanhaller stefanhaller enabled auto-merge April 26, 2026 14:56
@stefanhaller stefanhaller merged commit db380b4 into master Apr 26, 2026
14 checks passed
@stefanhaller stefanhaller deleted the auto-select-single-github-remote branch April 26, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant