Skip to content
Snippets Groups Projects

Add alphabetical sort for branch names

Merged Gaurav Marwal requested to merge gitlab-community/gitlab:sort_branch_names into master

What does this MR do and why?

Branches returned did not have any default or configurable sorting logic. See #422493 (closed). Hence have added a change to provide alphabetical sorting in this MR.

Since the https://gitlab.com/gitlab-community/gitlab/-/blob/master/app/models/repository.rb?ref_type=heads#L320 returns an array of branch names alphabetical sorting was the most viable option.

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.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 2 Warnings
    :warning:

    featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.

    For more information, see:

    :warning: Labels missing: please ask a reviewer or maintainer to add feature flag to this merge request.
    1 Message
    :book: This merge request adds or changes files that require a review from the Database team.

    This merge request requires a database review. To make sure these changes are reviewed, take the following steps:

    1. Ensure the merge request has database and databasereview pending labels. If the merge request modifies database files, Danger will do this for you.
    2. Prepare your MR for database review according to the docs.
    3. Assign and mention the database reviewer suggested by Reviewer Roulette.

    The following files require a review from the Database team:

    • app/finders/repositories/branch_names_finder.rb

    Reviewer roulette

    Category Reviewer Maintainer
    backend @pslaughter profile link current availability (UTC-5) @schin1 profile link current availability (UTC+8)
    database @bwill profile link current availability (UTC-5) @a_akgun profile link current availability (UTC+3)

    Please check reviewer's status!

    • available Reviewer is available!
    • unavailable Reviewer is unavailable!

    Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

  • Hi Coach @terrichu, this Community contribution is ready for review or needs your coaching.

    • Do you have capacity and domain expertise to review this? If not, find one or more reviewers and assign to them.
    • If you've reviewed it, add the workflowin dev label if these changes need more work before the next review.

    This message was generated automatically. You're welcome to improve it.

  • requested review from @terrichu

  • mentioned in issue #422493 (closed)

  • Peter Leitzen changed milestone to %Backlog

    changed milestone to %Backlog

  • Peter Leitzen changed milestone to %16.10

    changed milestone to %16.10

  • Peter Leitzen changed milestone to %16.11

    changed milestone to %16.11

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading