-
Notifications
You must be signed in to change notification settings - Fork 7
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
Gitlab subgroups doesn't seem to be supported #28
Comments
I'm actually not a GitLab user. Would you tell me the expected behavior? What URL should be opened in the case? I guess
but I want to ensure. |
Yes, this is the expected URL. Github URLs contain only a group/user and a repository, meanwhile Gitlab URLs can contain multiple subgroups ( If you want an example, here's one: https://gitlab.com/gitlab-com/alliances/google/sandbox-projects/gitlab-tweet-app |
OK, thank you for the clarification. We need to search the last slash for separating slug into owner and repository. |
I gave it a try: https://gitlab.com/rhysd-group/subgroup/repo-in-subgroup |
Thank you so much! 🙏 |
This fix was released at v0.11.12. |
I have a Gitlab remote URL with this format:
When trying, for example, to open a commit with the following command:
The following URL is opened:
It seems like Gitlab subgroups aren't supported.
I'm not a Rust developer so I can't submit a reliable PR within reasonable time, however I've searched a bit and the issue comes from the
slug_from_path
function:git-brws/src/service.rs
Lines 396 to 407 in 5a1c351
Instead of considering the URL will be splitted in only two parts, you should use the last element of the iterator as the repository, and join all the other elements with
/
as the separator.The text was updated successfully, but these errors were encountered: