gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
9.03k stars 1.35k forks source link

Wrong pull request URL detect when use sub-group in GitLab Self-Managed #3176

Open trduclong opened 8 months ago

trduclong commented 8 months ago

Description

I have a repository with url like: https://my.company.com/parents-group/sub-group/project-name.git

I already link personal access token in gitlens. But in merge request show in autolink, URL ignore parent-group, only detect sup-group and project-name

example I have merge request !1 right url: https://my.company.com/parents-group/sub-group/project-name/-/merge_requests/1 actual url: https://my.company.com/sub-group/project-name/-/merge_requests/1

Is this a bug ? I don't know. If anyone know a workaround to fix this, please tell me. thanks.

GitLens Version

14.8.2

VS Code Version

Version 1.87

Git Version

No response

Logs, Screenshots, Screen Captures, etc

No response

OscarXvita commented 7 months ago

having the same problem, currently I used a workaround to replace all "/-/" in the js file for the plugin, would be better if the url is customizable.

Strongbeard commented 5 months ago

As a work-around I add the following to each of my project's .vscode/settings.json. It is a pain to do it for every repo, but at least it "fixes" the autolink and does not require maintaining a fork of gitlens.

"gitlens.autolinks": [
    {
        "url": "https://my.company.com/parents-group/sub-group/project-name/-/merge_requests/<num>",
        "prefix": "merge request parents-group/sub-group/project-name!"
    }
]

Replace the prefix value with whatever line your gitlab adds to the merge commit it creates for accepted merge requests identifying said merge request.