Skip to content

Adds /target_branch slash command functionality for merge requests

What does this MR do?

Adds /target_branch slash command functionality for merge requests

Allows to use slash command /target_branch <target_branch_name> in merge requests notes and description. Command allow specifying target branch for current merge request.

Are there points in the code the reviewer needs to double check?

Tests, permissions, architectural correctness

Why was this MR needed?

It was proposed in #23619 (closed)

Screenshots (if relevant)

command in listbranch picker

Questions:

I'm pretty new to gitlab and despite it is only about 100 loc, it was challenging to me and took a couple days of work:

  1. Is it looks good? Did I miss anything?
  2. Any test I should add here?
  3. Do we need tests for frontend part of this feature? I didn't find any frontend test for slash commands

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #23619 (closed)

Merge request reports