Skip to content

Show target branch of MRs in Global Search

What does this MR do and why?

Makes Global Search consistent with the search in Merge requests by showing in its results the target branch of an MR when it is not the project's default branch.

That change will allow users to determine the target branch of an MR without having to load it. That will prove most useful in the use case of having multiple MRs with the same title but going to different branches (for example main and release).

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
GlobalSearch.png GlobalSearch-proposal.png

How to set up and validate locally

  1. Set up the GitLab Development Kit (GDK) locally (instructions here).
  2. Check out the changes from this branch into the GDK tree.
  3. Search using [🔍 Search or go to...] in the sidebar to find merge requests from the pre-populated test data. For example: http://gdk.local:3000/search?scope=merge_requests&search=merge.
  4. See search results.

Addresses #443368 (closed)

Merge request reports