ci: Skip CI checks for draft pull requests#10610
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
📝 WalkthroughWalkthroughThe CI workflow now responds to selected pull request activity types and prevents its jobs from running for draft pull requests, while retaining execution for push events and non-draft pull requests. ChangesCI workflow gating
Estimated code review effort: 2 (Simple) | ~10 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10610 +/- ##
=======================================
Coverage 93.78% 93.78%
=======================================
Files 192 192
Lines 16832 16832
Branches 248 248
=======================================
Hits 15786 15786
Misses 1025 1025
Partials 21 21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🎉 This change has been released in version 9.10.1-alpha.6 |
Pull Request
Issue
Draft pull requests currently trigger the full CI workflow, spending Actions minutes on work that isn't ready for review. This follows the approach discussed in https://github.com/orgs/community/discussions/120231.
Approach
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}to every job. Draft PRs skip all jobs; pushes to the protected branches and non-draft PRs run as before. Thegithub.event_name != 'pull_request'clause guardspushruns, since thedraftfield doesn't exist for push events.ready_for_reviewto thepull_requesttriggertypes. Without it, marking a draft as ready fires an event type the workflow doesn't listen for by default, so CI wouldn't run until the next push. The default types (opened,synchronize,reopened) are re-listed because specifyingtypesreplaces the default set rather than extending it.Behavior:
release/alpha/beta/ ...Note: GitHub does not bill for skipped jobs, so draft PRs incur no Actions charges.
Tasks