Skip to content

Opening a GitHub PR to a specific branch fails since update #3780

Open
@matt-sanders

Description

Describe the bug
I've recently upgraded LazyGit from 0.38.2 to 0.43.1. On 0.38.2 I would create a pull request to a specific branch using O, select my branch, and press enter. This would open a url like this: https://github.com/<org>/<repo>/compare/<base>...<compare>?expand=1. Since the update, I've noticed that my options all contain origin/ at the beginning of the base. This results in the following URL: https://github.com/<org>/<repo>/compare/origin%2F<base>...<compare>?expand=1 and GitHub gives me a page saying there is nothing to compare. If I remove the origin%2F then it works as expected.

Is this maybe a config that's changed recently?

To Reproduce
Steps to reproduce the behavior:

  1. Open LazyGit in a directory with an existing git repo with a remote named "origin" hosted on GitHub.
  2. Create a new branch, push some changes
  3. Press O to open the "View create pull request options" menu
  4. Choose the second option "Select branch"
  5. Select a branch, they should all be prefixed here with origin/ and press enter
  6. Notice the page from GitHub saying "nothing to compare"

Expected behavior
It should open a PR creation page correctly.

Version info:
commit=, build date=, build source=homebrew, version=0.43.1, os=darwin, arch=arm64, git version=2.39.3 (Apple Git-145)
git version 2.39.3 (Apple Git-145)

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions