[WIP] pkg/gui: Only suggest remote branches when creating a PR against a selected branch
When creating a PR against a selected branch (via O = "create pull request options"), the suggestion area is now populated with all remote branches - instead of all local ones. After all, creating a PR against a branch that doesn't exist on the remote won't work.
To support "PR is not filed against 'origin' remote" use cases (e.g. when contributing via a fork that is 'origin' to a GitHub project that is 'upstream'), branches of all remotes (and not only 'origin') are listed. This also simplifies the implementation.
Fixes #1826.
One thing I wonder is, would it make more sense to first choose a remote and then choose the branch, rather than select from branches across all remotes?
Definitely. I'm pretty busy right now, but hope to find some time in the next one or two weeks to incorporate the feedback and update the PR :)
One thing I wonder is, would it make more sense to first choose a remote and then choose the branch, rather than select from branches across all remotes?
Definitely. I'm pretty busy right now, but hope to find some time in the next one or two weeks to incorporate the feedback and update the PR :)
@jesseduffield - That took a bit longer than expected :( I've changed the implementation to match the discussed approach (Select origin first, branch from that origin second). If there is only a single remote, the first step is skipped automatically. Could you have another look at the changes to see whether that's going in the right direction? If so, I'd clean up the PR for a final review.
Sorry for the late re-review @moha-gh , I'm happy with the direction you've taken. Let me know when it's ready for another pass
@jesseduffield : Thanks, no worries. I'll try to get the PR rebased and cleaned up soon'ish :)
Uffizzi Ephemeral Environment deployment-19547
:cloud: https://app.uffizzi.com/github.com/jesseduffield/lazygit/pull/1889
:page_facing_up: View Application Logs etc.
What is Uffizzi? Learn more!