DEV Community

Cover image for Automate your GitHub pull requests with a PR Questionnaire Template
Unclebigbay
Unclebigbay

Posted on • Originally published at unclebigbay.com

Automate your GitHub pull requests with a PR Questionnaire Template

Merry Christmas from unclebigbay

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.

image.png

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.

image.png

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.

image.png


Step 2:

๐Ÿ”ต Create your pull request questionnaire template.

These are questions you will like the contributors to answer for each pull request.

image.png

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


Enter fullscreen mode Exit fullscreen mode

Click on the commit changes when you're done.

image.png


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 ๐Ÿ™‹โ€โ™‚๏ธ

image.png

Top comments (0)