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

Unable to connect to repositories under GitLab subgroups #2643

Closed
PDallaPiazzaEdalab opened this issue Dec 30, 2021 · 1 comment · Fixed by #2758
Closed

Unable to connect to repositories under GitLab subgroups #2643

PDallaPiazzaEdalab opened this issue Dec 30, 2021 · 1 comment · Fixed by #2758
Projects

Comments

@PDallaPiazzaEdalab
Copy link

Description of problem

When the depth of the repository has more than two levels, the kiwitcms is unable to communicate with GitLab

Steps to Reproduce

  1. Create a group on GitLab (G1)
  2. Create a subgroup in it (G2)
  3. Create a project in the subgroup (P1)
  4. Open a new issue on P1
  5. Setup the bug tracker as following:
  1. Health check: https://gitlab.com/G1/G2/P1/-/issues/1

Actual results

Two banners with failed communication (404 Can't find project) and the integration does not work

Expected results

It should work

Additional info (Python traceback, logs, etc.)

I guess that the problem is in the GitlabThread class, in the repo_id method.

return "/".join(bug_system.base_url.strip().strip("/").split("/")[-2:])

@rene-schoene
Copy link

I can confirm this bug, happens in the latest version of Kiwi as well.

A possible fix could be to use urlparse, e.g.,

import urlparse

return urlparse.urlparse(bug_system.base_url).path.lstrip('/')

@atodorov atodorov added this to To do in BACKLOG Mar 12, 2022
BACKLOG automation moved this from To do to Done Apr 25, 2022
atodorov pushed a commit that referenced this issue Apr 25, 2022
use urlparse() instead of manually parsing the base_url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants