Do you use Pull Request templates to specify the expectations and requirements for each PR?

Last updated by Tiago Araújo [SSW] 3 months ago.See history

Pull Request templates are a great way to communicate expectations to developers. You should create different PR templates for different types of PRs. For example, you can have a PR template for bug fixes, a PR template for new features, and a PR template for refactoring. You are also able to create specific PR templates for specific code paths.

You can read how to implement PR templates in the GitHub Docs - Creating a pull request template for your repository.

When creating a PR template, think of how you can help developers create great PRs.

no pr template
Figure: Bad example - There is no information to guide developers

pr template with comments to guidance
Figure: OK example - The PR template contains handy links to guidance for creating great PRs ⭐

pr template asking for context
Figure: Good example - This PR template asks for context (to help reviewers), along with guidance links for creating great PRs ⭐

Tip: You can use comments in the Markdown as above. These comments will not show when the PR is created, and is only visible when editing the description.

For a great Pull Request template, take a look at @SSWConsulting/SSW.GitHub.Template.

We open source. Powered by GitHub