Use the right API for group list_selector inside branch rule drawer
What does this MR do and why?
This MR solves point 4 of #470867 (closed)
- introduce the same API for searching groups, that is used on Project / Settings / Repository / Protected branches to
list_selectorshared component - add search parameter to that API
- add documentation for
list_selectorshared component
A previously used endpoint allowed to select the group that owns the project to Allowed to merge and Allowed to push and merge branch protection. This however was throwing an error from the backend.
Query plan: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/30636/commands/95087
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- In rails console enable the experiment fully
Feature.enable(:edit_branch_rules) - Invite another group to a project.
- Go to Project / Settings / Repository and expand Branch rules section
- Select View details of a branch rule you have defined or add new branch rule.
- In Allowed to merge or Allowed to push and merge section click Edit
- Start searching for a group, add a group and then save changes. You should be able to see the group you invited, but not the group that owns the project.
Related to #470867 (closed)
Edited by Paulina Sedlak-Jakubowska

