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 |
---|---|
How to set up and validate locally
- Create a new repository
- Create a file ".gitlab/issue_templates/(test).md" with content "test"
- In Rails console execute
Project.find(<project_id>).repository.expire_all_method_caches
- Try to create a new issue, you should see a new template to select
- Select the
(test)
template (onmaster
branch it will raise an error) - 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.
-
I have evaluated the MR acceptance checklist for this MR.