Add default issue and merge request templates in a project's repository
Release Notes
In addition to defining default issue and merge request description templates within a project's settings, you can now set default templates in the .gitlab
directory of a project's repository by including a default.md
file within the issue or merge request templates folders. If default templates exist in both the project's settings and in the repository, the template in the settings will take precedence.
Thanks for the contribution @davebarr
!
❗ Update
2022-03-16 - Closing this issue as it has been resolved and implemented.
This was originally introduced via !76326 (merged). We recently received a report that this introduced a fairly severe regression (#350358 (closed)) as well as potentially diminishing some "works by default" compliance controls for certain customers.
The suggested course of action is as follows:
-
Revert !76326 (merged) via !78288 (merged) -
Fix the regression -- addressed in !78302 (merged) -
Update the logic of default template selection such that the database default template takes precedence over the default.md
template if both exist. If no database template exists anddefault.md
does exist, that will be used as the default template. If a database template exists and nodefault.md
exists, the database template will be used as the default. -- addressed in !78302 (merged)
Description
It seems like Default description template for issues
and Default description template for merge requests
in (project_url)/settings
is not able to be loaded from .gitlab
folders and thus there are no history on who modified what.
Proposal
Make Default.md
or whatever better name for the default templates on preloaded templates.
Links / references
I'm assuming this is an EE feature based on Help page, but if this is also a CE feature, feel free to copy the issue to there.
Documentation blurb
Why should someone use it; what's the underlying problem.
You have no track of the change of default description templates for (issues|merge requests).
What is the solution.
Make .gitlab/
folders to store default templates in addition to other templates and load the default template from there.
How does someone use this
Make a .gitlab/issue_templates/Default.md
or .gitlab/merge_requests_template/Default.md
and just use it.