Skip to content

Indicate reverted status of a merged merge request

What does this MR do?

This MR adds a "reverted" indicator to the individual MR page when it has been reverted by another MR. It is also shown in MR list in projects/groups and the dashboard one. The (reverted) on the MR page will link to the merge request that reverted the current MR, similar to the moved indicator link on issues.

The MR also adds a small section in the user documentation about this feature.

Related to #35824.

Screenshots

Merge Request Page

MR is reverted by another MR? Before After
No image Unchanged
Yes image image

Merge Request List

MR is reverted by another MR? Before After
No image Unchanged
Yes image image

Steps to Test

  1. Go to a project
  2. Create the default branch if it doesn't exist
  3. Create a commit on a new branch
  4. Create a merge request from your new branch to the main branch
  5. Merge the merge request
  6. Click on the Revert button in the merge section
    • alternative: go to the merge commit, click on the "Options" dropdown, and click Revert
  7. Keep the option "Start a new merge request with these changes" enabled
  8. optional: Check that the MR you want to revert doesn't yet indicate that it's been reverted
  9. Merge the reverting MR
  10. Check that the initial MR links to the reverting MR in the status (Merged (reverted))

To check that the (reverted) indicator is shown in the list, go to /dashboard/merge_requests locally.

Short Video Demo VD: the video demos the steps described in the current section

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 Kev

Merge request reports