Draft status for GitHub PR Automations

Feature request for product/service

Background Agent (GitHub, Slack, Linear,…)

Describe the request

Currently you can set triggers in automations for “PR opened” and “PR pushed” - is it possible to put a option here to enable the trigger to run when the PR is in a draft state or not?

hey @bitttttten, thanks for your message, it seems like Automations already treat draft vs ready as separate triggers, as you can see in the attached screenshot, Draft opened actually runs when a draft PR is created, for further info, you can check Automations | Cursor Docs it’s the first element of the list!

Hey, Tom pointed you in the right direction. For drafts there’s a separate trigger called Draft opened, and it only fires when a draft PR is opened.

Current PR trigger behavior:

  • PR opened fires only for non-draft PRs, drafts are skipped
  • Draft opened fires only for draft PRs
  • PR pushed fires on pushes to any PR, including drafts

So instead of one trigger with a toggle, you use two separate triggers. If you need both cases, draft and non-draft, you can add two triggers to the same automation.

Docs for triggers: Automations | Cursor Docs

If you need a case the current triggers don’t cover, for example fire when a PR moves from draft to ready, tell me your exact use case and I’ll pass it to the team as feedback.

Thanks gang for the replies! That is clear, and that the behaviour is there is great.

You mention “PR opened fires only for non-draft PRs, drafts are skipped” - although this was not true for us.. I’ll keep an eye on it although we definitely had automations run on draft PRs last week.

Glad to hear that this is what is intended already. So what I’ll do is report back if I see it happening again, then I can share some automation IDs and run/agent IDs with ya.

Thanks!

Glad it’s clear now.

About PR opened triggering on a draft PR, it’s supposed to skip draft PRs by design. So if that really happened, that’s an interesting case and I’d like to dig into it.

If it happens again, please send:

  • the automation ID
  • the run ID or agent ID for that run
  • an approximate timestamp

Also, please double-check which trigger was set on that automation, PR opened vs PR pushed vs Draft opened. PR pushed triggers on draft PRs by default, so I want to rule out any confusion.

With that info, we can take a deeper look. Thanks!

Is there a way to not trigger automations on pushes to draft PRs? I have a review automation that triggers on both PR Opened and PR Pushed and I only want it to kick off when the PR is ready.

Hey, quick summary of the current trigger behavior:

  • PR opened only fires for non-draft PRs, and it also fires when a draft PR is marked as ready for review
  • PR pushed fires on pushes to any PR, including drafts
  • Draft opened only fires when a draft PR is created

So right now there’s no native toggle to make PR pushed skip draft PRs. If you want a review exactly when the PR becomes ready, PR opened already covers that, since it triggers when a draft moves to ready for review, and you can keep only that. But if you also want re-reviews on later pushes to an already-ready PR, but not to drafts, there isn’t a built-in filter for that yet.

A workaround that works today: add an instruction to your automation prompt to check the PR status and exit without doing anything if the PR is a draft. The agent can read the PR state and skip the run. Not perfect because the run still starts, but it avoids unwanted draft reviews.

I’ll pass along a request for a native option like “don’t trigger PR pushed for draft PRs” to the team as feedback. If there’s an update, I’ll reply here.

Trigger docs: Automations | Cursor Docs

Yeah this is what we’re doing now. Works but feels wasteful to start an agent session just for that :slight_smile: Thanks for passing it along to the team!