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

Add support for groups that have only digits in their names and contain no alphabetic characters #467

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DudyShavit
Copy link

Description of Changes

Problem Description

When configuring a GitLab multi-branch project, we search for projects by entering an OWNER name.
The OWNER can be a user or a group.
It has been found that projects belonging to groups with numeric names (e.g., group named "566") cannot be found.

image

Solution Description

The solution is to find the group using its ID instead of its name.
To implement this, we will reverse the current order of operations in the code.

The current order of operations for searching for a group in the code is:
Search for the OWNER by username
Search for the OWNER by group name or group ID

The solution is to reverse the search order:
Search for the OWNER by group name or group ID
Search for the OWNER by username

Testing done

Test finding OWNER by group name

image

Test finding OWNER by group ID

image

Test finding OWNER by username

image

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

first search for OWNER type of group
afterwards search for OWNER type of user
@DudyShavit DudyShavit marked this pull request as ready for review January 23, 2025 20:38
@DudyShavit DudyShavit requested a review from jetersen as a code owner January 23, 2025 20:38
@mifitous
Copy link
Contributor

Approved

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.

2 participants