ci: skip CI runs on draft pull requests#180
Merged
Merged
Conversation
### Why? Draft PRs are work-in-progress and don't need the full CI suite running on every push. Running lint, build, unit, integration, and e2e jobs on drafts wastes runner capacity and adds noise while the author is still iterating. ### What? - Guard every job (and the `required-checks` gate) with `github.event_name != 'pull_request' || github.event.pull_request.draft == false`. The `event_name` half keeps `push` (main) and `merge_group` (merge queue) running, since `pull_request.draft` is null for those events. - Preserve the `required-checks` gate's `if: always()` by combining it with the draft guard, so draft PRs don't fail on the gate's treat-skipped-as-failure logic. - Add `ready_for_review` to `pull_request.types` so CI triggers when a draft is marked ready — the existing opened/reopened/synchronize types don't fire on that transition. ### Test Plan ✅ YAML validated with `yaml.safe_load`. Behavior to confirm post-merge: draft PRs run no jobs; marking a PR ready, pushes to main, and merge queue all run the full suite.
mnoah1
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
Draft PRs are work-in-progress and don't need the full CI suite running
on every push. Running lint, build, unit, integration, and e2e jobs on
drafts wastes runner capacity and adds noise while the author is still
iterating.
What?
required-checksgate) withgithub.event_name != 'pull_request' || github.event.pull_request.draft == false.The
event_namehalf keepspush(main) andmerge_group(mergequeue) running, since
pull_request.draftis null for those events.required-checksgate'sif: always()by combining itwith the draft guard, so draft PRs don't fail on the gate's
treat-skipped-as-failure logic.
ready_for_reviewtopull_request.typesso CI triggers when adraft is marked ready — the existing opened/reopened/synchronize types
don't fire on that transition.
Test Plan
✅ YAML validated with
yaml.safe_load. Behavior to confirm post-merge:draft PRs run no jobs; marking a PR ready, pushes to main, and merge
queue all run the full suite.