DEV Community

Glenn Carremans
Glenn Carremans

Posted on

Travis CI added draft pull requests support

About 3 months ago I noticed that Github drafts are not triggering Travis CI builds, not even when the draft flag gets removed.

Comment for #2035

Glennmen avatar
Glennmen commented on

Strange, Travis doesn't get triggered if Draft has been removed.


Update: I made a ticket about it on Travis CI Community: https://travis-ci.community/t/removing-draft-doesnt-trigger-travis/2715

I made a ticket about this on the Travis forum, the workaround suggested at the time was closing and reopening the PR.

Now today (24/06) Travis CI added support for building draft PR's, not only when they are marked ready for review.

This should improve the quality of the PR's as testing can be done in draft PR's and marked ready for review when all tests pass.

What do you think about this update? Do you use draft PR's or rather add [WIP] in the PR title.

Top comments (4)

Collapse
 
mattipv4 profile image
Matt Cowley

I use WIP bot wherever possible, never touched draft PRs. I much prefer the simplicity of having โ€œ๐Ÿšงโ€ at the start of the title and then the pending bot check over the draft PR UI.

Collapse
 
glennmen profile image
Glenn Carremans

But there are benefits that draft PRs have that WIP bot can't provide.

  • There are multiple visible indicators that it is a draft PR, WIP is limited in this.
  • Draft PRs can't be merged, WIP bot can't block merges.
  • 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.
Collapse
 
mattipv4 profile image
Matt Cowley

There are multiple visible indicators that it is a draft PR, WIP is limited in this.

I honestly prefer having the single indicator of the ๐Ÿšง emoji in the title.

Draft PRs can't be merged, WIP bot can't block merges.

It can... have branch protection rules in place that require all checks to pass :)

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.

Never personally worked on a project with code owners, either manually requested views or had a bot that requests reviews once all checks pass.

Collapse
 
maestromac profile image
Mac Siri

Oh this is great news! Thanks for sharing this.