Pull requests are at the heart of open source.
You want to improve documentation, fix a bug or implement a feature to your favorite project on GitHub.
You branch off
master and start working.
For some reason there are a lot more details to consider now that you are actually writing the code
and things take longer than you expected.
You have 999/1000 tests passing.
Your branch is getting out of date due to new commits on
Maybe you even realize that you have no idea how to finish what you started.
With this introduction I tried to describe some triggers that confront you with the question of when to open a pull request. If a project has guidelines on that (probably described in the pull request template) then by all means follow them. However, if there is no guidance then here are some points to consider:
The first tab on any pull request page is called conversation. That suggests that a pull request is not a finished product but rather a process.
Closed non-merged pull requests are valuable too. Imagine your pull request implements a feature that the project decides against including. The closed pull request can then serve as documentation or connection point for future discussions on the same topic. That being said you should always try to make sure your work is welcome before doing it.
Opening a pull request is a clear signal that you are actively working on it and helps coordinate with other contributors.
These were all arguments in favor of opening pull requests early. Now here is the main reason why you want to open late:
- The action of opening a pull request asks maintainers for feedback. Since most maintainers are basically volunteers doing it in their free time we should strive to make their job as easy as possible. And obviously the more complete your work is, the easier it is to review.
This is the tradeoff to be made and somwhere along these lines is the right point in time to open your pull request.