Skip to content

Add UI for lock on merged Merge requests

Brett Walker requested to merge 408676-add-ui-for-lock-on-merge into master

What does this MR do and why?

  • Adds checkbox on project/group label edit pages to allow the setting of lock_on_merge
  • Does not show checkbox on label creation pages. This is just an extra protection against accidentally setting it.
  • If lock_on_merge is set for a label, you can not unset it. This is now enforced in the label update service.
  • Adds a "Lock on merge" badge in the list of labels.

Screenshots or screen recordings

Screenshot_2023-08-13_at_10.03.29_PM

Screenshot_2023-08-13_at_10.04.35_PM

How to set up and validate locally

  1. Enable the feature flag: Feature.enable(:enforce_locked_labels_on_merge)
  2. Visit a group or project label list, and edit a label. You should see the new checkbox.
  3. Click and save. Back in the list, you should see the "Lock on merge" badge for that label.
  4. Edit the same label. The checkbox should be disabled.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #408676

Edited by Brett Walker

Merge request reports