Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to subgroups on gitlab.com gives 404 #134

Open
jonaskello opened this issue Dec 21, 2021 · 1 comment
Open

Link to subgroups on gitlab.com gives 404 #134

jonaskello opened this issue Dec 21, 2021 · 1 comment

Comments

@jonaskello
Copy link

In gitlab you can have a subgroup which makes the URL longer.

For example lets say we have groupa and under it a subgroup groupb. So it becomes groupa/groupb. Then the URL for a file in the repo/project project1 that lives in groupb would become something like this:

https://gitlab.com/groupa/groupb/project1/blob/xxxxx/path/to/source/file#L123

However the plugin adds an extra /git in front of the url so it becomes:

https://gitlab.com/git/groupa/groupb/project1/blob/xxxxx/path/to/source/file#L123

This results in a 404. Removing the /git prefix gives the correct page.

@tortis
Copy link

tortis commented May 17, 2022

I'm getting this as well. I thought it might be a problem with the version of git-url-parse package that's being used. I wrote a test script and tried it with v11.1.1 (and a few other versions) of git-url-parse, but it never produced a url with /git

const gitUrlParse = require('git-url-parse');

const remote = '[email protected]:dev/group/project.git';
const gitUrl = gitUrlParse(remote);
const url = gitUrl.toString('https').replace(/(\.git)$/, '');
console.log('url:', url);

This produces https://gitlab.myorg.com/dev/group/project without the extra /git.

So maybe it has to do with the remote url that's getting passed into get-url-parse?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants