Automate your GitHub pull requests with a PR Questionnaire Template
A 2 steps Guide
Table of contents
Pull request is a means of submitting contributions to fix a bug or add a new feature to a publicly accessible project or a private project you've been granted write access to.
A good pull request should answer what the pull request does, why the pull request is needed, and how the pull request can be tested.
Pull request is the summary of the 1 liner or 200k lines of code you're adding to the repository, this summary will enable the maintainer to understand what changes you're making, why you're making the change, and what approach you're taking to make the changes.
As a contributor, you should always have in mind that your pull request must answer the WHAT, WHY, and HOW of the changes you are requesting to be added to the project.
But how do you do that?
In this guide, you will learn how to set up a Pull Request Questionnaire Template that will help you and your team have a standard and uniform pull request throughout your project.
This questionnaire will pop up for each of the new pull requests that are being opened on the repository
Step 1:
๐ต Create a pull_request_template.md
file
You can create a pull_request_template.md
file directly on GitHub or on your local branch.
Step 2:
๐ต Create your pull request questionnaire template.
These are questions you will like the contributors to answer for each pull request.
You can edit the markdown sample below to suit your project preference.
# What does this PR do?
xxx
# Why this PR?
xxx
# How did you get it done?
xxx
# Screenshots (if appropriate)
xxx
# How can this be tested?
xxx
Click on the commit changes when you're done.
Congratulations!!! you have successfully added a pull request questionnaire for every pull request on your project repository.
Conclusion
You have learned from this article how to create a pull request questionnaire template for your GitHub repositories.
Wow, what a journey, I am glad you made it to the end of this article, if you enjoyed and learned something new from this article, I will like to connect with you.
Let's connect on
See you in the next article. Bye Bye ๐โโ๏ธ
If you found my content helpful and want to support my blog, you can also buy me a coffee below, my blog lives on coffee ๐.