Environment variable that tells whether PR is a draft PR

Hi there,

why isn’t there a environment variable that tells whether the current build is a build belonging to a GitHub Draft Pull Request?
I would expect a complementary variable TRAVIS_PULL_REQUEST_DRAFT that is “true” if the GitHub PR is in draft mode.
IMO This is necessary to skip certain build/test stages while in draft mode. E.g., skipping e2e tests to avoid them being run on every WIP commit.

Thanks & best regards

Why would you want to know that?

  • You cannot rerun a PR build when the draft mark is removed (unless you push another commit after that), so you want to run the same check regardless of the draft status.

  • The build status for every batch of pushed commits is also shown as a mark alongside them in PR UI. The build logic behind those statuses suddenly becoming different at an arbitrary moment will make them misleading.