Hi Jira community! I'm hoping a creative person here has figured out a workaround for a limitation I'm frequently asked about as a Jira Admin.
Jira Cloud doesn't currently allow triggering workflow actions based on the state of a PR - feature suggestion here, please vote for it if you're reading this!
We have workflow actions set up that automatically transition work items when a PR is created. The automations are super helpful a lot of the time, EXCEPT when a developer creates a PR in Draft state.
In those cases, the work item still transitions to the next status, even though the PR is a draft and isn't ready for that yet. The developer then has to manually update their ticket status, and has to remember to update the status again when their PR is no longer in draft state.
I haven't found a workaround to this limitation. Has anyone found one?
Heyo.
First of all, i'm not very creative, but I've often found a way to make things work that shouldnt, which is both great and not.
So let me shoot my (not very) smart idea:
GitHub's rest api seems to have an attribute for if a PR is in draft or no. See at the bottom of the example response on this page: https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests.
So one COULD (and that is neither smart nor effective, but i just cant be quiet) send a webrequest to github on transition to see if it is a "real" pr, and if not, revert the transition with a comment saying that the PR is just a draft.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.