• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to Create Description Templates for Gitlab Projects

1324

To Create Description Templates for GitLab Projects

Description template is an option available on GitLab, which allows the users to define context specific templates for an issue. Also, they are used for merging request description fields for the projects. Each and every project on GitLab 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 and stored in your project' s repository under a directory named .gitlab. Oed. As a part of our GitLab series, we have covered a tutorial related to creating a project on GitLab.

To Create a Project refer https://www.linuxhelp.com/how-to-create-a-project-in-gitlab/

In this article, let us see the method to create a Description Template for your GitLab project.

To create Description Templates

Log in to your Gitlab Server and choose the project to which you need to create a description template. Choose the Issues tab from the menu.

GitLab

Click on the New Issue button.

new_issue

When the New Issue page appears, click on the description template option available under the Title field.

description_templates

Once it is done, log into your GitLab server via SSH, and enter your project’ s repository directory that you have already cloned while creating your project and project repository.

[root@git ~]# ls
anaconda-ks.cfg  Desktop  Documents  Downloads  initial-setup-ks.cfg  Music  Pictures  Public  sample-project  Templates  Videos
[root@git ~]# cd sample-project/
[root@git sample-project]# ls -la
total 8
drwxr-xr-x.  3 root root   33 Mar 27 02:46 .
dr-xr-x---. 17 root root 4096 Mar 27 02:45 ..
drwxr-xr-x.  8 root root 4096 Mar 27 02:47 .git
-rw-r--r--.  1 root root    0 Mar 27 02:46 README.md

Now create the .gitlab/issue_templates/ and .gitlab/merge_request_templates/ directories under your project’ s home directory.

[root@git sample-project]# mkdir -p .gitlab/issue_templates/
[root@git sample-project]# mkdir .gitlab/merge_request_templates/

Once it is done, move to .gitlab/issue_templates/ directory and create a markdown (.md) file in order to enable description templates for issues.

[root@git sample-project]# cd .gitlab/issue_templates/
[root@git issue_templates]# vim test.md

Place any content inside test.md file. And then move to /gitlab/merge_request_templates/ directory and create a markdown .md file in order to enable description templates for merge request.

[root@git issue_templates]# cd ..
[root@git .gitlab]# cd merge_request_templates/
[root@git merge_request_templates]# vim merge.md

Place any content inside merge.md file.


After creating any new file inside your project repository, commit and update the changes to git server which will enable the server to identify the new files. Once it is done, update test.md and merge.md file to git server.

[root@git sample-project]# cd .gitlab/issue_templates/
[root@git issue_templates]# ls
test.md
[root@git issue_templates]# git add test.md 
[root@git issue_templates]# git commit -m " test commit" 
[master c82ddd1] test commit
 1 file changed, 1 insertion(+)
 create mode 100644 .gitlab/issue_templates/test.md
[root@git issue_templates]# cd ..
[root@git .gitlab]# cd merge_request_templates/
[root@git merge_request_templates]# ls
merge.md
[root@git merge_request_templates]# git add merge.md 
[root@git merge_request_templates]# git commit -m " merge commit" 
[master fd7e889] merge commit
 1 file changed, 1 insertion(+)
 create mode 100644 .gitlab/merge_request_templates/merge.md

Both the files are now added to Git and are committed and ready to go. You can push those files into git using the following command.

[root@git merge_request_templates]# cd ../..
[root@git sample-project]# git push -u origin master
Password for ' http://root@192.168.5.143' : 
Counting objects: 11, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (10/10), 760 bytes | 0 bytes/s, done.
Total 10 (delta 0), reused 0 (delta 0)
To http://root@192.168.5.143/root/sample-project.git
   d490e1d..fd7e889  master ->  master

Once all these procedure is done, go to your Git WebUI and create a new issue. A new Dropdown menu for description templates appears on your screen.

choose_template

You can create an issue on the template you have chosen.

5

Wasn' t it a simple method to create a Description Template? Stay connected to know more about various other aspects of GitLab from our future articles.

Tags:
connor
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

How to create project in gitlab?

A

refer the following link for create profect in gitlab
https://www.linuxhelp.com/how-to-create-a-project-in-gitlab/

Q

How to add users im gitlab?

A

use the following link for adding the user in gitlab
https://www.linuxhelp.com/how-to-create-a-group-on-gitlab/

Q

where to create a new issue in gitlab?

A

Once all these procedure is done, go to your Git WebUI and create a new issue. A new Dropdown menu for description templates appears on your screen.

Q

how to add the codes in git?

A

After creating any new file inside your project repository, commit and update the changes to git server which will enable the server to identify the new files. Once it is done, update test.md and merge.md file to git server.
# cd .gitlab/issue_templates/
# git add test.md
# git commit -m " test commit"

Q

which command to push the codes to gitlab?

A

use the following command to push the codes to gitlab
# git push -u origin master

Related Tutorials in How to Create Description Templates for Gitlab Projects

Related Tutorials in How to Create Description Templates for Gitlab Projects

How to add local folder to a GitLab project
How to add local folder to a GitLab project
Apr 20, 2017
How to reset gitlab admin password
How to reset gitlab admin password
Mar 30, 2017
How to Install and configure GitLab runner on centos 7
How to Install and configure GitLab runner on centos 7
Oct 22, 2021
How to change default backup location in GitLab
How to change default backup location in GitLab
Apr 17, 2017
How to add users to group in GitLab
How to add users to group in GitLab
Feb 15, 2017
How to Change the Administrator Password in GitLab-CE on CentOS 7.6
How to Change the Administrator Password in GitLab-CE on CentOS 7.6
Aug 3, 2019
How to add SSH key to a GitLab account
How to add SSH key to a GitLab account
Apr 22, 2017
How to Create Description Templates for Gitlab Projects
How to Create Description Templates for Gitlab Projects
Mar 28, 2017

Related Forums in How to Create Description Templates for Gitlab Projects

Related Forums in How to Create Description Templates for Gitlab Projects

gitlab
baseer class=
How to check gitlab version
Oct 24, 2017
Git
vertonskjelvic class=
error: failed to push some refs to in gitlab
Nov 24, 2017
gitlab
caden class=
Insufficient space in download directory /var/cache/yum/x86_64/6/base/packages
Jul 22, 2019
gitlab
brayden class=
GitLab: The project you were looking for could not be found
May 23, 2017
gitlab
ceriaimmaculate class=
Gitlab : how to rename branch name
Oct 26, 2017
gitlab
otwol class=
502 Error Whoops Gitlab is Taking too much of time to respond
Jul 29, 2019
gitlab
ajinfernando class=
Gitlab : how to switch remote repository URL from ssh to http
Oct 25, 2017
gitlab
otwol class=
How to Check the version of Gitlab-CE 12.0.3 On CentOS 7.6 and Where is it exactly Located
Jul 23, 2019

Related News in How to Create Description Templates for Gitlab Projects

Related News in How to Create Description Templates for Gitlab Projects

Gitlab assures its users of data recovery post data loss incident
Gitlab assures its users of data recovery post data loss incident
Feb 4, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luk Van De Looverbosch ?
How to create a root ?

Hello,
How to create root@linuxhelp in Linux Mint 20.1 64-bit ?
Thanks in advance for your reply.
Best regards.

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.