Add support for groups that have only digits in their names and contain no alphabetic characters
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.
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
Test finding OWNER by group ID
Test finding OWNER by username
Submitter checklist
- [X] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
- [X] Ensure that the pull request title represents the desired changelog entry
- [X] Please describe what you did
- [ ] Link to relevant issues in GitHub or Jira
- [ ] Link to relevant pull requests, esp. upstream and downstream changes
- [X] Ensure you have provided tests - that demonstrates feature works or fixes the issue
Approved
Hi @DudyShavit, unfortunately we don't have any members of @jenkinsci/gitlab-branch-source-plugin-developers actively reviewing incoming pull requests for this plugin. We don't want your pull request to be in limbo forever; you can step forward to become a maintainer of this plugin following the instructions here:
https://www.jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/