Yihui Xie

The Second Pull Request Could be (Much) Better

Yihui Xie / 2018-03-07

When considering pull requests on Github, we need to keep in mind that even if someone’s first pull request is not 100% perfect, his/her second one could be much better (if he/she is willing to continue the contribution). I have observed this phenomenon several times, and that is one of the reasons why I want to carefully review and help with people’s first pull requests. I’m looking at the future, instead of only the current pull request.

A fresh example is Leonardo Collado-Torres’s recent (and the second) pull request to the blogdown package, in which he brought a very useful RStudio addin that makes it really neat to upload and insert images to your blog posts:

The insert image addin in blogdown

This is useful because it saves users from the headache of understanding the special static/ directory in the Hugo system. You just upload your image, and this addin will copy it to the right place and insert the right Markdown or HTML code in your post.

Actually his first PR was also very helpful (it fixed a nontrivial bug), but I have to say the second PR looked so exciting to me when I first saw it. Now I miss nothing in WordPress. Many thanks to Leo, the great hacker.

That... is... awesome!

P.S. Leo has published a more detailed blog post about this addin.