app dev

Git Lab Merge and Pull Request Templates – An Experiment

Git Lab Merge Request Templates are a fairly exciting way for me to help drive consistency in the projects I am participating in – internal, external and personal.   I created a new folder in .gitlab/issue_templates/and added a file ( based on Pull Request).  For GitHub (not GitLab) switch the folder to .github.

When you go to raise a Merge Request, you can select a template using the template query parameter on GitHub

You can see the example at Pull Request 4.  Developers can select the check boxes and indicate if they are compliant with the minimum to commit.

Merge and Pull Request Template
Merge and Pull Request Template

GitLab is slightly different, and that you select the template from a drop down.  I actually prefer this approach which makes it easier to select.

Good luck, go forth and be consistent with Pull Requests and Merge Requests.

05-AUG-2019: Update: Per Git Hub documentation, one is able to use “.github” repository as a way to apply templates to any repository in an organization / group.You can learn about it here

Decide whether to store your contributing guidelines in your repository's root, docs, or .github directory. Then, in the filename field, type the name and extension for the file. Contributing guidelines filenames are not case sensitive, and can have an extension such as .md or .txt.