Azure DevOps Pull Request Templates

Azure DevOps Pull Request Templates

Pull requests are a very handy feature when you are working in a team. However, you might want to have a check list of some sort or maybe a special format on your pull requests. One way to standardize your pull requests are to use templates.

Default Template

To make a default pull request template you need to create a file called pull_request_template.me or pull_request_template.txt. The file needs to be placed in a folder called .azuredevops, .vsts or docs. The folder is required to be placed in your root folder.

Pull request template example:

Pull request description...

### Type
- [ ] New feature
- [ ] Refactoring
- [ ] Bug-fix
- [ ] DevOps
- [ ] Testing

### Checklist
- [ ] Tests have passed
- [ ] Check linting
- [ ] Rember to check universal design

### Demo
- [ ] https://feature1.example.com

Branch Specific Template

Additionally you might want to have branch specific templates. If you want to use a certain template for each pull request to master you need to create a file called master.md or master.txt and place the file in .azuredevops/pull_request_template/branches/master.md. The folder structure should be placed in your project's root folder. You can also change replace the .azuredevops folder with .vsts, docs or no folder at all and place the pull_request_template in your root folder.

If you want to read more of the specific to Azure DevOps pull request templates you can find their documentation here

If you want to support this blog you can do so by signing up to DigitalOcean using this referral link.