diff options
author | Achilleas Pipinellis <axilleas@axilleas.me> | 2016-08-17 13:27:14 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2016-08-17 15:13:12 +0300 |
commit | 0237b218b07340ba5f00fd5932b1e37af5b02cf3 (patch) | |
tree | 353392f2f277f9a995ccd10f29e620f24371be1c /doc/user/project/description_templates.md | |
parent | 7dde4ed26b27fb4524687cfc73c4bf765300bfa3 (diff) | |
download | gitlab-ce-0237b218b07340ba5f00fd5932b1e37af5b02cf3.tar.gz |
Refactor description templates documentation
Diffstat (limited to 'doc/user/project/description_templates.md')
-rw-r--r-- | doc/user/project/description_templates.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/user/project/description_templates.md b/doc/user/project/description_templates.md new file mode 100644 index 00000000000..5f1cd126425 --- /dev/null +++ b/doc/user/project/description_templates.md @@ -0,0 +1,41 @@ +# Description templates + +>**Note:** [Introduced][ce-4981] in GitLab 8.11. + +Description templates allow you to define context-specific templates for issue +and merge request description fields for your project. + +## Overview + +By using the description templates, users that create a new issue or merge +request can select a description template to help them communicate with other +contributors effectively. + +Every GitLab project can define its own set of description templates as they +are added to the root directory of a GitLab project's repository. + +Description templates must be written in [Markdown](../markdown.md) and stored +in your project's repository under a directory named `.gitlab`. Only the +templates of the default branch will be taken into account. + +## Creating issue templates + +Create a new Markdown (`.md`) file inside the `.gitlab/issue_templates/` +directory in your repository. Commit and push to your default branch. + +## Creating merge request templates + +Similarly to issue templates, create a new Markdown (`.md`) file inside the +`.gitlab/merge_request_templates/` directory in your repository. Commit and +push to your default branch. + +## Using the templates + +Let's take for example that you have created the file `.gitlab/issue_templates/bug.md`. +This will enable the `bug` dropdown option when creating or editing issues. When +`bug` is selected, the content from the `bug.md` template file will be copied +to the issue description field. + +![Description templates](img/description_templates.png) + +[ce-4981]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4981 |