Skip to content

Allow parentheses for template names

What does this MR do and why?

Contributes to #349267 (closed)

Problem

The regular expression for API endpoint doesn't not accept parentheses. This restriction is not documented and it's probably just a bug.

Solution

Permit parentheses for project_templates API.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2023-11-30_at_17.23.04 Screenshot_2023-11-30_at_17.22.11

How to set up and validate locally

  1. Create a new repository
  2. Create a file ".gitlab/issue_templates/(test).md" with content "test"
  3. In Rails console execute Project.find(<project_id>).repository.expire_all_method_caches
  4. Try to create a new issue, you should see a new template to select
  1. Select the (test) template (on master branch it will raise an error)
  2. You should see the content of the template

MR acceptance checklist

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

Merge request reports