A pull request template is a standardized document used to guide contributors in creating pull requests with consistent and relevant information. It helps streamline the review process and ensures that essential details are provided for the reviewer to understand the purpose and changes introduced in the pull request. In this documentation, we'll cover how to create a pull request template for your project.
Decide on the sections you want to include in your pull request template. Typical sections may include:
- Title: A clear and concise title summarizing the purpose of the pull request.
- Description: A detailed description of the changes made in the pull request.
- Motivation: The reason behind the changes and why they are necessary.
- Testing: Instructions on how to test the changes and any test results.
- Screenshots/GIFs: Visual aids to showcase the changes (if applicable).
- Related Issues: Mention any related issues or pull requests.
- Checklist: A checklist of tasks that the contributor should complete before submitting the pull request.
Open your text editor and create a new file with the filename pull_request_template.md. You can place this file in the root directory of your project or in a .github folder.
Using the sections defined in Step 1, write the content for each section in the template file. Here's an example of a pull request template in Markdown format:
## Pull Request Title
[Provide a clear and concise title for your pull request]
## Description
[Explain the changes introduced by the pull request in detail]
## Motivation
[Explain the reason behind these changes and why they are necessary]
## Testing
[Describe how the changes were tested and provide test results]
## Screenshots/GIFs
[Include any relevant screenshots or GIFs showcasing the changes (if applicable)]
## Related Issues
[Cite any related issues or pull requests that are associated with this pull request]
## Checklist
- [ ] I have tested the changes thoroughly
- [ ] The code follows the project's coding standards
- [ ] Documentation has been updated (if applicable)
- [ ] All tests pass successfullySave the changes to your pull request template file and commit it to your project's version control system (e.g., Git). Ensure the template file is in the designated location (root directory or .github folder).