jesseduffield / lazygit

simple terminal UI for git commands
MIT License
53.65k stars 1.87k forks source link

How to open MR from my fork against the upstream repo #4030

Open rabin-io opened 3 weeks ago

rabin-io commented 3 weeks ago

Describe the bug When I use the open to open a MR (gitlab in my case), the URL which lazygit open is against the origin repo, and not from my repo/fork against the origin repo.

To Reproduce Steps to reproduce the behavior:

In my lazygit config, I have these lines,

services:
  'gitlab.example.com': gitlab:example.com
  1. Have 2 remotes, origin and my-fork
  2. From your local branch (which use my-fork us the upstream) press o
  3. The URL for the MR which open in the URL is with
    
    https://example.com/<origin>/<repo>/-/merge_requests/new?merge_request[source_branch]=<my-branch-name>
  4. Need to manaully change the <origin> to <my-origin> to let the UI load the MR correctly, but even then is only aginst master and not the base of <my-branch-name>
**Expected behavior**
Press `o` and URL should be from my fork against the source of my branch.

**Screenshots**

**Version info:**

❯ git --version git version 2.47.0

❯ lazygit --version commit=611fabde11d24d9acc71ee26077b9a1101f59f27, build date=2024-09-18T10:56:10Z, build source=binaryRelease, version=0.44.1, os=linux, arch=amd64, git version=2.47.0


**Additional context**
mark2185 commented 3 weeks ago

There is a menu under O (uppercase) that allows you to select a branch, but I think that will get you only half of the way there.

Opening pull requests across forks or nonOrigin-nonOrigin is a bit... muddled.

rabin-io commented 3 weeks ago

Maybe extended the service key options to allow url customization, per service?