DEV Community

Anastasia
Anastasia

Posted on

Pull request template

I am wondering how some people are against about a checklist of what a pull request should have before it can be merged / what a reviewer should be looking for when reviewing a PR.
Of course, all we are lazy humans. And we rather skip it at all than try to follow it up. But I think it's a problem of our attitude to this thing. Of course, this approach has own pros and cons. IMHO, the checklist reminds us about the important steps what we should do or check. It means better and more consistent code quality and helps to avoid breaking the rule of no surprises. Also, it's useful for new team members.
I am sure you will say, that a well-experienced developer should keep this list in mind all the time. But I am not talking about obvious things as use patterns, best practices: Single Responsibility Principle, KISS, DRY, SOLID, etc.

It could be something like that or even less:

Top comments (4)

Collapse
 
bljusruk profile image
bljusruk

Hi,
I find pull request templates very useful. We use them a lot. The default is located in our root repo directory and filled with default values. The rest of the information is left to the developers to fill when they make a pull request. But we still have a number of developers that do not enter any info in pull request template. They just leave it with the defaults. My question is: is it possible somehow to force the developer to fill in the info in pull request so that it does not contain only default values. Maybe to reject creating a pull request in case pull request template does not contain required information?

Collapse
 
harittweets profile image
Harit Himanshu

If you are using github, you can automate a lot of such things. Check out help.github.com/en/articles/enabli...

Hope that help

Collapse
 
miledi_delafer profile image
Anastasia

Thanks, we already use it.
But this template provides a little bit other things.

Collapse
 
fyodorio profile image
Fyodor

Awesome, thanks for sharing! But wouldn't you mind embedding a GitHub gist or something like that instead of the screenshot? 👍