Fixes #2021 - Use scoped routes for GitLab URLs#2022
Conversation
GitLens uses legacy project routes for GitLab:
- `${projectURL}/branches`
- `${projectURL}/tree/${branch}`
- `${projectURL}/commit/${sha}`
- `${projectURL}/compare/${base}${notation}${compare}`
- `${projectURL}/blob/${ref}/${fileName}`
These routes are all deprecated and scheduled for removal. See these references:
- https://docs.gitlab.com/ee/development/routing.html#project-routes
- https://gitlab.com/gitlab-org/gitlab/-/issues/118849
- https://gitlab.com/gitlab-org/gitlab/-/issues/28848
This change replaces them with the following scoped routes:
- `${projectURL}/-/branches`
- `${projectURL}/-/tree/${branch}`
- `${projectURL}/-/commit/${sha}`
- `${projectURL}/-/compare/${base}${notation}${compare}`
- `${projectURL}/-/blob/${ref}/${fileName}`
|
@eamodio Could you please take a look at this PR when you have the time? |
|
@Brcrwilliams Changes look great! Thank you. One question I have is will this cause issues for any current users? Or will the addition of |
|
@eamodio Thank you for merging! Regarding your question:
These routes are available to all users and were added many years ago. It may not work for people who are using self-hosted GitLab instances that are on a very old version, but a GitLab instance which is that old will be affected by several critical security vulnerabilities. So, I would say that those users have bigger things to worry about than their links not working. |

Description
Refs #2021
GitLens uses legacy project routes for GitLab:
${projectURL}/branches${projectURL}/tree/${branch}${projectURL}/commit/${sha}${projectURL}/compare/${base}${notation}${compare}${projectURL}/blob/${ref}/${fileName}These routes are all deprecated and scheduled for removal. See these references:
This change replaces them with the following scoped routes:
${projectURL}/-/branches${projectURL}/-/tree/${branch}${projectURL}/-/commit/${sha}${projectURL}/-/compare/${base}${notation}${compare}${projectURL}/-/blob/${ref}/${fileName}Examples:
Checklist
Fixes $XXX -orCloses #XXX -prefix to auto-close the issue that your PR addresses