Apply /label slash command when editing MRs

Summary

We have a security MR template that includes the line:

/label ~security

However, if you create the security MR (perhaps using -omr.create -omr.target=12-2-stable-ee, as I do), then edit it to apply the template, the slash command doesn't get executed and the MR doesn't get the security label. Less than awesome.

Steps to reproduce

  • Create MR without template
  • Edit MR
  • Choose a template with a /label ~foo slash command
  • Save the MR

What is the current bug behavior?

Label is not applied

What is the expected correct behavior?

Label should be applied

Output of checks

This bug happens on dev.GitLab.org

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Assignee Loading
Time tracking Loading