# Means to skip tasks if PR is a draft?

**URL:** <https://discuss.circleci.com/t/means-to-skip-tasks-if-pr-is-a-draft/42312>\
**Category:** Product Feedback\
**Tags:** github, pull-requests\
**Created:** [December 17, 2021, 11:32am UTC](https://discuss.circleci.com/t/means-to-skip-tasks-if-pr-is-a-draft/42312 "2021-12-17T11:32:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cansjt](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cansjt/32/28949_2.png) [@cansjt](https://discuss.circleci.com/u/cansjt)\
**Post date:** [December 17, 2021, 11:32am UTC](https://discuss.circleci.com/t/means-to-skip-tasks-if-pr-is-a-draft/42312/1 "2021-12-17T11:32:54Z")

</div>

I am wondering how one could know whether a PR is a draft one and based on this, skip certain tasks.

E.g. skip deployment tasks until the PR is switched from draft to open.  
Indeed in some case it could nice to be able to run a complete test suite through, something that may prove hard to reproduce locally because resources or dependencies, but not yet deploy the end-result in a staging/dev environment.

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [December 19, 2021, 3:08am UTC](https://discuss.circleci.com/t/means-to-skip-tasks-if-pr-is-a-draft/42312/2 "2021-12-19T03:08:06Z")

</div>

All I can think of is having a step that uses the GitHub API to check this and just quit if it’s a draft PR. There isn’t a built-in way with CircleCI.

---

<div class="post-metadata">

**Author:** ![cansjt](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cansjt/32/28949_2.png) [@cansjt](https://discuss.circleci.com/u/cansjt)\
**Post date:** [December 19, 2021, 10:31pm UTC](https://discuss.circleci.com/t/means-to-skip-tasks-if-pr-is-a-draft/42312/3 "2021-12-19T22:31:04Z")

</div>

Thanks. That’s pretty much what I had figured out.

I think it would be more convenient, if there was way for the build to have access to payload of the web hook that triggered it (maybe via a file you can retrieve in the build workspace ? Or an environment variable). No need to waste time in the Job to get back information that should already be available. Would be really neat.

---

<div class="post-metadata">

**Author:** ![vijaytholpadi](https://avatars.discourse-cdn.com/v4/letter/v/3be4f8/32.png) [@vijaytholpadi](https://discuss.circleci.com/u/vijaytholpadi)\
**Post date:** [September 2, 2024, 6:23am UTC](https://discuss.circleci.com/t/means-to-skip-tasks-if-pr-is-a-draft/42312/4 "2024-09-02T06:23:49Z")

</div>

Has there been any progress in this area?

For context, Bitrise already provides a [couple of ways](https://devcenter.bitrise.io/en/builds/starting-builds/skipping-a-given-commit-or-pull-request.html#preventing-a-pull-request-from-triggering-a-build) to do this
