Don't build/deploy site when the PullRequest is in Draft

Hello Netlify,

How do I disable the builds/deploys for PR’s that are in draft mode?

In Github there is an option to have draft mode PR and I don’t want to spend my precious minutes building something that is not ready

Since all notifications look the same to us, you’d probably want to instruct us somehow not to build your site. There are a few ways listed here: [Support Guide] How can I optimize my Netlify build time?

The two that I think are most relevant are:

  • if you can add “[skip ci]” to the commit message for those PR’s, we will not build.
  • if you write your own ignore script that can detect a draft PR, you can choose when we shouldn’t build: File-based configuration | Netlify Docs
1 Like

Is netlify going to support this as a configuration? Like: don't build on draft PR's?

I could file a feature request, but I wouldn’t expect it to be implemented soon - we’re not really working on that part of our app right now.

For the foreseeable future, the two suggestions I gave you will be the best method to achieve your goals.

Let me know more about your use case if neither work (like - why neither work :)) , so I can incorporate that feedback into the feature request.

Hello @fool

I added [skip ci] to the commit msg but it still builds in Netlify

This is the commit msg:

Update GraphQL

[skip ci]

@romariolopezc, the [skip ci] is on the third line. This likely means this is in the extended description.

Would you please test including that on the first line of the commit comment and in the first 50 characters there (which is what Git considers to be the “commit title”)?

If that still doesn’t work, please let us know.