Skip to content

Advanced Search: redirect single sha result for project search

What does this MR do?

Basic search already allowed Project scoped searches for SHA with a single result returned for commits to redirect to that result. The redirect would only happen if no other results were returned.

This MR changes:

  • Enable redirect for Advanced Searches
  • Remove calls to perform search and redirect if search is project scoped, a commit can be found, and user has permission
  • Redirect happens always if a SHA is used for search term
  • Add flash notice was added to let the user know why the redirection happened. Include link that allows them to go back to search results.
  • Removed code no longer needed
  • Added more specs
  • Updated documentation with a screenshot

Issue #233278 (closed)

Screenshots

expand for redirection screenshot image
expand for forced search results screenshot image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Terri Chu

Merge request reports