When I was interviewing GitHub employees for my book (<a href="https://buildingtoolswithgithub.teddyhyde.io/" rel="nofollow">https://buildingtoolswithgithub.teddyhyde.io/</a>) one of them made a surprising comment. Early on, his GitHub teammates told him he should create an empty PR with a plan of attack before writing any code. I thought it was a brilliant idea and most teams don't do this. Smart of them to make this a separate feature instead of just bolting on WIP.
Help me understand something -- right now my workflow is to create a new branch when I'm working on a new feature. One branch per feature. I check in frequently and push up so my work is saved.<p>Sometimes I ask people to look at the code in progress when I want opinions on architecture or just overall code quality.<p>When I think the feature is ready for merging, I'll create a pull request.<p>How does a draft PR help me? What do I get with a draft PR that I don't already have?<p>I assume it's a good idea, and everyone here seems to think so too, so I think I'm missing something obvious.<p>Edit: Lots of great points below, mostly pointing out features that I don't really use a lot, which is why I didn't see the improvement. Thanks everyone!
It would also be nice to have a way to link multiple PRs together so they can be merged simultaneously. A ton of people are working across multiple repos which makes reviewing and coordinating changes really annoying.
This blog post really doesn't sell this feature well. How is this any different at all from me just putting "WIP" in the title of the PR? Ok, so it prevents merging a WIP PR - who would do that?
Love it. I’ve had success using Issues in the past to do get implementation feedback, and have a “one pager” for whatever I/the team was working on at the time, but it didn’t feel like it stuck very well with junior team members.<p>Having something like this that allows a little closer relationship between the plan and the code created for the plan is nice.
This is good. We have been emulating this with either a "don't review yet" tag or by opening a pull request without setting reviewers, but it's clearly better to have support for it built in. More people will use it, and I don't have to train people in our particular way of indicating not-ready pull requests.
Very happy about this. We recently switched to github and I asked my team to start their PRs immediately. Was pretty disappointed to discover that they needed something to commit first. Having a draft state will in itself be really useful.
This is rad. I usually like to put up a PR early and add a WIP label. This lets my teammates take a look at the early direction of whatever I'm doing and I can make changes as necessary. This is a small but really impactful feature!
It’d be nice to have some way to configure exactly how the “draft pull request” works, because there are a couple cases where I think this could be improved:<p>* Notifying the maintainers might be useful in some cases. Often, I will file a WIP pull request to get preliminary review by a maintainer so that I know I’m going in the right direction.<p>* Being able to convert a draft pull request into a full one: Useful if the original author has stopped responding and you’d like to merge in their changes (after tweaking them, etc.)
> <i>Also, if you have a CODEOWNERS file in your repository, a draft pull request will suppress notifications to those reviewers until it is marked as ready for review.</i><p>I'm not sure. When I send a PR marked with PR I usually want to know the opinion of the maintainer/owner to know if it is going in the right direction and if it worth finishing.
I love this! I draft pull requests as an ad-hoc branch management scheme at work with a [WIP] prefix, and reviewers are notified when I make a change (small team so not too spammy). When it's ready I update the summary and remove [WIP]. There might be a better way to do it (and I'd love to hear suggestions), but this is how I do it right now.
I literally saw someone ask for this feature on Twitter last week. VSTS/VSO/DevOps/? already has something similar.<p>This seems like the kind of feature that probably takes longer than a week to build and test, so I'm guessing it was already in the works.
I count at least 17,800 requests for this feature. <a href="https://www.google.com/search?q=%22WIP%22+inurl%3Apull+site%3Agithub.com" rel="nofollow">https://www.google.com/search?q=%22WIP%22+inurl%3Apull+site%...</a>
I can already see this coming in handy on our private team repo as I was not far off from revoking someone's merge permissions for abusing PRs, this will be a nice little way to 'jail' the offending party.
This will be helpful for the cultural clash that can sometimes happen when a new contributor tries to do something like this and the maintainers expect all PRs to be immediately merge-worthy.
I could be wrong, but I feel this actually enables the wrong kind of behavior we should expect from developers. We want fast, continuously integrated code that is merged early.
Usually that means using feature toggles so that we can see compilation issues without the code being active by default.<p>This feature signals "yeah it's OK to take your time and not merge stuff incrementally - here's a feature just for that since it's such an important part of your workflow".
Yes, people have been doing it anyway but at least it felt a bit like a hack, like it's not supposed to work that way.<p>Am I crazy, or is this pushing back progress made in CI coding practices?