-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow user to select remote and branch when creating a PR #1889
Allow user to select remote and branch when creating a PR #1889
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jesseduffield: Would be great if you could have a look, I need a few pointers to continue here :)
@@ -375,7 +375,7 @@ func (self *BranchesController) createPullRequestMenu(selectedBranch *models.Bra | |||
OnPress: func() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that when using the "against selected branch" option for a GitHub fork, GitHub won't automatically open the PR against the upstream. But that has nothing to do with my change (same behaviour on current master
). Might be worth an additional look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm not sure how best to address that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had another look at this: Apparently, to create a PR against a different remote (mainly the upstream I'd guess) the URL would need to look different.
Instead of something like
https://github.com/moha-gh/lazygit/compare/master...mh%2Fpr-suggest-remote-branches-only?expand=1
one would need to use
https://github.com/jesseduffield/lazygit/compare/master...moha-gh:lazygit:mh/pr-suggest-remote-branches-only?expand=1
That means the "repo URL" of the target remote (https://github.com/jesseduffield/lazygit/
instead of https://github.com/moha-gh/lazygit
) is used and the full name of the source repo is prepended to the remote branch branch (with /
replaced by :
).
To handle this correctly, the createPullRequest()
would need to be extended I think - so one can pass target and source remote as well, allowing the function to build the URL correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to me. I'm happy for that to be handled as a separate pull request (given that it's currently broken on master). As you say, it'll require updating HostHelper.GetPullRequestURL
to take extra arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then let's fix this separately 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, left some feedback.
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?
@@ -375,7 +375,7 @@ func (self *BranchesController) createPullRequestMenu(selectedBranch *models.Bra | |||
OnPress: func() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm not sure how best to address that
@@ -375,7 +375,7 @@ func (self *BranchesController) createPullRequestMenu(selectedBranch *models.Bra | |||
OnPress: func() error { | |||
return self.c.Prompt(types.PromptOpts{ | |||
Title: branch.Name + " →", | |||
FindSuggestionsFunc: self.helpers.Suggestions.GetBranchNameSuggestionsFunc(), | |||
FindSuggestionsFunc: self.helpers.Suggestions.GetRemoteBranchesWithoutRemotePrefixSuggestionsFunc(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got no problem with long names
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 :) |
8e00faa
to
5310d37
Compare
FindSuggestionsFunc: self.helpers.Suggestions.GetBranchNameSuggestionsFunc(), | ||
HandleConfirm: func(targetBranchName string) error { | ||
return self.createPullRequest(branch.Name, targetBranchName) | ||
Title: "Select Target Remote", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd make this translatable when finalizing the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you do, be sure to use Sentence case
for _, remote := range self.model.Remotes { | ||
if remote.Name == remoteName { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an easier/nicer way to find the matching remote?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moha-gh you could use lo.Find
(I think that's what it's called). Can't recall if it's actually less verbose all things considered
@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
|
@moha-gh this is still a draft PR. Did you intend to return to this? |
@jesseduffield : The issue has been bugging me again lately, so yes, I'd like to give this another try. I'll see whether I come round to it in the next two weeks. |
c6f4f80
to
dede117
Compare
@jesseduffield : I've rebased the PR and tried to adapt it to the various changes that happened since the last update. Could you have another look, especially re. the error handling (not sure whether I modified that correctly, now that some functions don't return errors anymore). What still remains is the issue that (at least for GitHub) creating a PR from a fork against a upstream repo still doesn't work correctly. I left a comment in the discussion here in the PR. I'd be nice to get this fixed as well - since that was one of the main motivations for starting to work on this PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
for _, remote := range self.model.Remotes { | ||
if remote.Name == remoteName { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moha-gh you could use lo.Find
(I think that's what it's called). Can't recall if it's actually less verbose all things considered
@@ -162,10 +162,38 @@ func (self *SuggestionsHelper) getRemoteBranchNames(separator string) []string { | |||
}) | |||
} | |||
|
|||
func (self *SuggestionsHelper) getRemoteBranchNamesForRemote(remoteName string) []string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the functions here that are not being called from anywhere.
@@ -764,6 +777,19 @@ func (self *BranchesController) createPullRequestMenu(selectedBranch *models.Bra | |||
return self.c.Menu(types.CreateMenuOptions{Title: fmt.Sprint(self.c.Tr.CreatePullRequestOptions), Items: menuItems}) | |||
} | |||
|
|||
func (self *BranchesController) promptForTargetBranchNameAndCreatePullRequest(fromBranch *models.Branch, toRemote string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If an error can't be returned from this function then let's just remove the error
return from the function signature
FindSuggestionsFunc: self.helpers.Suggestions.GetBranchNameSuggestionsFunc(), | ||
HandleConfirm: func(targetBranchName string) error { | ||
return self.createPullRequest(branch.Name, targetBranchName) | ||
Title: "Select Target Remote", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you do, be sure to use Sentence case
@@ -375,7 +375,7 @@ func (self *BranchesController) createPullRequestMenu(selectedBranch *models.Bra | |||
OnPress: func() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to me. I'm happy for that to be handled as a separate pull request (given that it's currently broken on master). As you say, it'll require updating HostHelper.GetPullRequestURL
to take extra arguments.
@@ -728,13 +728,26 @@ func (self *BranchesController) createPullRequestMenu(selectedBranch *models.Bra | |||
}, | |||
}, | |||
{ | |||
// TODO: Replace with "Select remote and branch"? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the current label is fine
c6096cc
to
d758517
Compare
@jesseduffield : Updated the PR to (hopefully) take all review comments into account. Also added error handling for the "user enters an invalid remote name" case. Previously, that would have resulted in an empty selection box for the branch name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, just one thing on syntax.
It would be good to have an integration test as well. Giving a rough sketch, it would look something like this:
var OpenPullRequestNoUpstream = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Open up a pull request, specifying an origin",
ExtraCmdArgs: []string{},
Skip: false,
SetupConfig: func(config *config.AppConfig) {
config.GetUserConfig().OS.OpenLink = "echo {{link}} > /tmp/openlink"
},
SetupRepo: func(shell *Shell) {
shell.NewBranch("branch-1")
shell.NewBranch("branch-2")
// Create a couple remotes
shell.CloneIntoRemote("origin")
shell.CloneIntoRemote("upstream")
shell.RunCommand([]string{"git", "remote", "set-url", "origin", "https://github.com/jesseduffield/lazygit"})
shell.RunCommand([]string{"git", "remote", "set-url", "upstream", "https://github.com/jesseduffield/other_repo"})
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
// Open a PR for the current branch
// Verify that we're prompted to enter the remote
// Select a remote and ensure that the expected URL is used (by checking the openlink file)
},
})
Let me know if you need any pointers
@@ -764,6 +776,28 @@ func (self *BranchesController) createPullRequestMenu(selectedBranch *models.Bra | |||
return self.c.Menu(types.CreateMenuOptions{Title: fmt.Sprint(self.c.Tr.CreatePullRequestOptions), Items: menuItems}) | |||
} | |||
|
|||
func (self *BranchesController) promptForTargetBranchNameAndCreatePullRequest(fromBranch *models.Branch, toRemote string) error { | |||
_, ok := lo.Find(self.c.Model().Remotes, func(remote *models.Remote) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use lo.NoneBy here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks for the hint.
85f674c
to
e0934db
Compare
@jesseduffield : Thanks for the test template. Used it to create one test where the entered name of the remote is invalid (and thus, an error should be shown). The other one mimics the successful creation of a PR. One thing I'm not sure about is how to properly validate the link. Opening the file in Go (and not via shell commands) and checking it's contents? Do you have an idea there? |
@moha-gh you could just navigate to the newly created file in the files view and assert the contents of the main view upon doing so. Alternatively you could add a method to the shell struct called |
We already have the |
e0934db
to
fee001e
Compare
@stefanhaller , @jesseduffield : Great, thanks for the pointers! I've finalized the test case and marked the PR as ready :) |
When creating a PR against a selected branch (via O = "create pull request options"), the user will first be asked to select a remote (if there is more than one). After that, the suggestion area is populated with all remote branches at that origin - instead of all local ones. After all, creating a PR against a branch that doesn't exist on the remote won't work. Please note that for the "PR is not filed against 'origin' remote" use case (e.g. when contributing via a fork that is 'origin' to a GitHub project that is 'upstream'), the opened URL will not be correct. This is not a regression and will be fixed in an upcoming PR. Fixes jesseduffield#1826.
fee001e
to
949e131
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great work. I'll merge once these tests pass
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [jesseduffield/lazygit](https://github.com/jesseduffield/lazygit) | minor | `v0.44.1` -> `v0.45.2` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>jesseduffield/lazygit (jesseduffield/lazygit)</summary> ### [`v0.45.2`](https://github.com/jesseduffield/lazygit/releases/tag/v0.45.2) [Compare Source](jesseduffield/lazygit@v0.45.0...v0.45.2) <!-- Release notes generated using configuration in .github/release.yml at v0.45.2 --> #### What's Changed ##### Enhancements 🔥 - Add ability to configure branch color patterns using regex by [@​mtrajano](https://github.com/mtrajano) in jesseduffield/lazygit#4130 - Collapse/uncollapse all files in tree by [@​mtrajano](https://github.com/mtrajano) in jesseduffield/lazygit#4131 - Improve undo action to restore files upon undoing a commit by [@​gabriellanata](https://github.com/gabriellanata) in jesseduffield/lazygit#4167 ##### Fixes 🔧 - Bump gocui (and tcell) by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4166 ##### Maintenance ⚙️ - Cut a new release automatically each month by [@​jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4146 - Bump tcell to fix broken deployment by [@​jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4178 #### New Contributors - [@​mtrajano](https://github.com/mtrajano) made their first contribution in jesseduffield/lazygit#4130 - [@​gabriellanata](https://github.com/gabriellanata) made their first contribution in jesseduffield/lazygit#4167 **Full Changelog**: jesseduffield/lazygit@v0.45.0...v0.45.2 ### [`v0.45.0`](https://github.com/jesseduffield/lazygit/releases/tag/v0.45.0) [Compare Source](jesseduffield/lazygit@v0.44.1...v0.45.0) <!-- Release notes generated using configuration in .github/release.yml at v0.45.0 --> Lots of great improvements in this one! Thanks to all the contributors who helped make this release happen. Apologies for the long waits between releases. As of jesseduffield/lazygit#4146 we're now (almost) guaranteed to do monthly releases. #### What's Changed ##### Enhancements 🔥 - Better branch delete confirmation by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#3915 - Add a menu item to delete both local and remote branch at once by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#3916 - Auto-render hyperlinks by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#3914 - Allow pasting commits multiple times by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#3983 - Add config option to disable switching tabs with panel jump keys (and disable by default) by [@​hgreenstein](https://github.com/hgreenstein) in jesseduffield/lazygit#3927 - We jumped the gun on this change in the last release: having the number key both select a panel and switch tabs was bad for muscle memory so it's that behaviour is now disabled by default. - Add new filter to only show tracked files in Files panel by [@​veremenko-y](https://github.com/veremenko-y) in jesseduffield/lazygit#4024 - Allow DiffContextSize to be decreased to zero by [@​LuxxxLucy](https://github.com/LuxxxLucy) in jesseduffield/lazygit#4050 - Allow user to select remote and branch when creating a MR by [@​moha-gh](https://github.com/moha-gh) in jesseduffield/lazygit#1889 - Delete range selection of branches by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4073 - Show the number of lines changed per file in working file tree view by [@​johannaschwarz](https://github.com/johannaschwarz) in jesseduffield/lazygit#4015 - Drop merge commits by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4094 - Wrap lines in staging view by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4098 - Allow to switch branches in Commit View ([#​4115](jesseduffield/lazygit#4115)) by [@​seflue](https://github.com/seflue) in jesseduffield/lazygit#4117 - Allow on prem Azure DevOps Server pull request by [@​waynebowie99](https://github.com/waynebowie99) in jesseduffield/lazygit#3954 - Add screen-mode command line argument by [@​alewis001](https://github.com/alewis001) in jesseduffield/lazygit#4103 - Default to half-screen mode when opening with certain CLI args by [@​jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4141 - Show the alt-enter keybinding at bottom of commit description view by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4136 - Add number of commits to cherry-pick confirmation prompt by [@​brandondong](https://github.com/brandondong) in jesseduffield/lazygit#4158 ##### Fixes 🔧 - Fix copying commit author to clipboard by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#3936 - Fix merge conflict resolution when file doesn't end with a LF by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#3976 - Fix file icons by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#3975 - Fix non-sticky range select after clicking in staging view by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#3998 - Fix scroll position when entering staging view by clicking in the main view by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#3992 - Fix mouse wheel scrolling of custom patch view by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4089 - Improve editing a commit by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4090 - Use custom context size in range diff by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4082 - commits panel: add missing default sort order by [@​phanirithvij](https://github.com/phanirithvij) in jesseduffield/lazygit#4097 - Fix issues with opening links and files using WSL by [@​bottino](https://github.com/bottino) in jesseduffield/lazygit#3850 - Fix moving a commit across a branch boundary in a stack of branches by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4096 - Don't preserve commit message when it's unchanged from initial message by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4110 - Fix hang when returning from shell command by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4126 - Prevent killing of unrelated processes on windows by [@​jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4137 - Add worktree option to fast forwarding operation by [@​john-mutuma](https://github.com/john-mutuma) in jesseduffield/lazygit#4051 - Don't show keybindings option in bottom line when panel is open by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4143 - Fix reset/rebase to upstream by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4151 - Avoid blank line at end of view by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4152 - Adjust line number for working copy when editing a line by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4119 - Fix `micro` editor preset by [@​kytta](https://github.com/kytta) in jesseduffield/lazygit#4156 - Use interactive shell for running shell commands only if shell is bash or zsh by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4159 ##### Maintenance ⚙️ - Add performance improvements section to release notes by [@​jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#3922 - ci: update `upload-artifact` and `download-artifact` actions to v4 by [@​Juneezee](https://github.com/Juneezee) in jesseduffield/lazygit#4063 - Let schema/config.json end with a line feed by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4092 - Saner view geometry by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4085 - Cleanup background fetch by [@​stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4084 - remove duplicate secondary MouseWheelUp keybind by [@​samueldominguez](https://github.com/samueldominguez) in jesseduffield/lazygit#4120 - enhancement: Use HEX colors on file icons instead of C256 colors by [@​hasecilu](https://github.com/hasecilu) in jesseduffield/lazygit#4029 - chore: use errors.New to replace fmt.Errorf with no parameters by [@​RiceChuan](https://github.com/RiceChuan) in jesseduffield/lazygit#4107 - Fix typos by [@​NathanBaulch](https://github.com/NathanBaulch) in jesseduffield/lazygit#3920 - Bump crypto and net packages by [@​jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4144 - Tweak file icons by [@​jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4145 - Standardise on 'screen mode' naming convention by [@​jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4142 ##### Docs 📖 - Fix installation for Ubuntu in README.md by [@​shaobosong](https://github.com/shaobosong) in jesseduffield/lazygit#4031 - Fixes to lazygit Ubuntu install instructions in README.md by [@​wrecklass](https://github.com/wrecklass) in jesseduffield/lazygit#3970 - Fix typos by [@​skoch13](https://github.com/skoch13) in jesseduffield/lazygit#4121 - Add vision and design principles doc by [@​jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4053 - docs: Stylize and correct the NixOS section in README.md by [@​wadsaek](https://github.com/wadsaek) in jesseduffield/lazygit#4135 - Update chinese translation for pull requests by [@​jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4140 - Set repology table to 3 columns by [@​hasecilu](https://github.com/hasecilu) in jesseduffield/lazygit#4138 - Update instructions for using OSC52 with tmux by [@​EliasA5](https://github.com/EliasA5) in jesseduffield/lazygit#3597 - Update docs to describe use of custom commands without keybindings by [@​a-jentleman](https://github.com/a-jentleman) in jesseduffield/lazygit#3846 - documentation - describe os.openLink by [@​smangels](https://github.com/smangels) in jesseduffield/lazygit#3094 - Clarify commit message prefix mechanics by [@​zeromask1337](https://github.com/zeromask1337) in jesseduffield/lazygit#4114 #### New Contributors - [@​shaobosong](https://github.com/shaobosong) made their first contribution in jesseduffield/lazygit#4031 - [@​hgreenstein](https://github.com/hgreenstein) made their first contribution in jesseduffield/lazygit#3927 - [@​wrecklass](https://github.com/wrecklass) made their first contribution in jesseduffield/lazygit#3970 - [@​veremenko-y](https://github.com/veremenko-y) made their first contribution in jesseduffield/lazygit#4024 - [@​LuxxxLucy](https://github.com/LuxxxLucy) made their first contribution in jesseduffield/lazygit#4050 - [@​phanirithvij](https://github.com/phanirithvij) made their first contribution in jesseduffield/lazygit#4097 - [@​bottino](https://github.com/bottino) made their first contribution in jesseduffield/lazygit#3850 - [@​johannaschwarz](https://github.com/johannaschwarz) made their first contribution in jesseduffield/lazygit#4015 - [@​samueldominguez](https://github.com/samueldominguez) made their first contribution in jesseduffield/lazygit#4120 - [@​skoch13](https://github.com/skoch13) made their first contribution in jesseduffield/lazygit#4121 - [@​wadsaek](https://github.com/wadsaek) made their first contribution in jesseduffield/lazygit#4135 - [@​seflue](https://github.com/seflue) made their first contribution in jesseduffield/lazygit#4117 - [@​waynebowie99](https://github.com/waynebowie99) made their first contribution in jesseduffield/lazygit#3954 - [@​EliasA5](https://github.com/EliasA5) made their first contribution in jesseduffield/lazygit#3597 - [@​alewis001](https://github.com/alewis001) made their first contribution in jesseduffield/lazygit#4103 - [@​a-jentleman](https://github.com/a-jentleman) made their first contribution in jesseduffield/lazygit#3846 - [@​john-mutuma](https://github.com/john-mutuma) made their first contribution in jesseduffield/lazygit#4051 - [@​RiceChuan](https://github.com/RiceChuan) made their first contribution in jesseduffield/lazygit#4107 - [@​NathanBaulch](https://github.com/NathanBaulch) made their first contribution in jesseduffield/lazygit#3920 **Full Changelog**: jesseduffield/lazygit@v0.44.1...v0.45.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMzcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjEzNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
When creating a PR against a selected branch (via O = "create pull request
options"), the user will first be asked to select a remote (if there is more
than one). After that, the suggestion area is populated with all remote branches
at that origin - instead of all local ones. After all, creating a PR against a
branch that doesn't exist on the remote won't work.
Please note that for the "PR is not filed against 'origin' remote" use case
(e.g. when contributing via a fork that is 'origin' to a GitHub project that is
'upstream'), the opened URL will not be correct. This is not a regression and
will be fixed in an upcoming PR.
Fixes #1826.