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

Check for /-/ in GitLab url (closes #1073) #1074

Merged
merged 3 commits into from
Dec 1, 2022
Merged

Conversation

dixong
Copy link
Contributor

@dixong dixong commented Dec 1, 2022

Make sure the /-/ string exists in path before splitting the path to avoid exception

Exception occurred:
File "c:\dev\gitlab\aero-software\internal\docs\venv\lib\site-packages\pydata_sphinx_theme_init_.py", line 998, in parse_url
group_and_subgroups, parts, *_ = path.split("/-/")
ValueError: not enough values to unpack (expected at least 2, got 1)

closes #1073

Make sure the /-/ string exists in path before splitting the path to avoid exception
Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree I think this makes sense, thanks!

what are examples of GitLab URLs that don't have the /-/? Can we add one to the documentation or to the tests?

@dixong
Copy link
Contributor Author

dixong commented Dec 1, 2022

This URL is valid https://gitlab.com/gitlab-org/gitlab-ce/issues/23251, it might just be an older format but it still works and does expand to https://gitlab.com/gitlab-org/gitlab-foss/-/issues/23251 when opened.

Will investigate the tests.

Copy link
Collaborator

@12rambau 12rambau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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 this pull request may close these issues.

Problem with the GitLab url formatting if the url is not in required format
3 participants