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

Edge case gitlab url, when url contains "issues", but does not end with "/" #1147

Closed
JoerivanEngelen opened this issue Feb 3, 2023 · 1 comment

Comments

@JoerivanEngelen
Copy link
Contributor

JoerivanEngelen commented Feb 3, 2023

I was getting the same error message as in issue #1073
But unfortunately PR #1074 did not fix this.

The issue happened because of the following link in our documentation:
https://gitlab.com/deltares/imod/imod-python/-/issues
But ending the link with a slash fixed this:
https://gitlab.com/deltares/imod/imod-python/-/issues/

This is the piece of code creating the issue

            if "/-/" in path and any(
                map(uri.path.__contains__, ["issues", "merge_requests"])
            ):
                group_and_subgroups, parts, *_ = path.split("/-/")
                parts = parts.split("/")
                url_type, element_number, *_ = parts

Because parts = parts.split("/") does not result in the expected split here.

My naive fix would be to test for:

            if "/-/" in path and any(
                map(uri.path.__contains__, ["issues/", "merge_requests/"])
            ):
@drammock
Copy link
Collaborator

I think this was addressed by #1186

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

Successfully merging a pull request may close this issue.

2 participants