Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can we determine the draft status in the pipeline?

Jeremy Richardson April 3, 2025

For certain PR pipelines I'd like to not run them if the PR is marked as draft.

Is there a way to do this?

1 answer

0 votes
Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2025

You could call Bitbucket API inside the pipeline and check if draft is true, and then not proceed/exit in your pipeline script.

It would still trigger the pipeline though, and after you mark your PR as non-draft, you will likely want to build it. However, I haven't checked it, but it won't be trigger automatically, you will need to push to force a build of your PR.

We provide a Bitbucket Cloud app, Flowie, which you can configure it not trigger pipelines based on certain conditions of the PR. You can use Flowie's draft workflow feature based on labels to achieve what you want. An as soon as the conditions change, say you mark PR as non-draft it will trigger the build.

We don't support Bitbucket built in draft yet, as it was recently released, but it should be added soon, if you prefer it over Flowie's draft support.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
loom essentials certification, loom training, get certified in loom, atlassian certification, loom async video, video messaging skills, atlassian learning, loom for teams, online certification, loom badge, loom for business, atlassian education

Get Certified in Loom! 🧑‍🎓

Time to up your Loom game! The new Loom Essentials Certification is here! Show off your skills, learn pro tips, and get officially recognized. Perfect for taking your video messaging to the next level.

Learn more
AUG Leaders

Atlassian Community Events