jesseduffield / lazygit

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

Azure DevOps pull request #2667

Open potchy opened 1 year ago

potchy commented 1 year ago

Describe the bug I deeply apologize if this is a overlook on my part, but I've been trying all day to get this working and failing to do so. I am trying to use lazygit's feature "create pull request" from the branches tab. The first time I tried, I got the error "Unsupported git service". From the issue #1548, I got the information that I have to setup a custom pull request URL. I tried to so by following the documentation and my config.yml is as follows.

services:
  "gitcompanyname.visualstudio.com": "azuredevops:dev.azure.com"

After doing that, I tried to use the "create pull request" option again, but I got the error "Failed to parse repo information from url". After searching through the issues here and Googling "lazygit azuredevops", the only thing I found is another person in superuser with the same issue.

I would really appreciate some pointers.

Version info: commit=5149b24ab3dfad3860e2300519c7c583dcc8c9ff, build date=2023-05-03T08:00:22Z, build source=binaryRelease, version=0.38.2, os=linux, arch=amd64, git version=2.34.1

Kahitar commented 9 months ago

Hi, is there a solution to this? The linked stackexchange article has a solution, but it doesn't work for me. My work's azure devops url also looks like this:

https://organization.visualstudio.com/devopsprojectname/_git/reponame

Kahitar commented 8 months ago

So I found a workaround for this. Instead of using this url as my local git remote:

https://organizationname.visualstudio.com/projectname/_git/reponame

I changed it to this:

https://organizationname@dev.azure.com/organization/projectname/_git/reponame

Apparently, these urls are aliases in my companies Azure DevOps setup (don't know if that's always the case).

Then I completely removed the 'services' configuration from my lazygit config. Now it's working as expected.