Feature improved branch filter sorting
What does this MR do?
This improves branch filter dropdown results for repositories that have many (hundreds) of branches, especially with branch naming conventions like 1234-feature-x-develop
which was branched from the develop
branch. In some cases searching a branch dropdown for develop
would not return the develop
in the dropdown list due to list limit and the large number of matches sorted by name.
1111-develop
2222-develop
...
bugfix-develop
What this MR does is improve the branch filter ordering so that more relevant results are first:
- List exact matches first
- Previous matching behavior
- Added support for begins_with matching (ex. ^develop)
- Added support for ends_with matching (ex. develop$)
So a search for develop
returns:
develop
1111-develop
2222-develop
...
bugfix-develop
And a search for ^develop
returns:
develop
develop-7777
develop-8888
...
And a search for -develop$
returns:
1111-develop
2222-develop
3333-develop
...
What are the relevant issue numbers?
Solves #32063 (closed) Solves #41575 (closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Edited by Jason Rutherford