Skip to content

Trigger CI on draft-to-ready PR conversion#1271

Merged
sbryngelson merged 1 commit intoMFlowCode:masterfrom
sbryngelson:fix/draft-to-ready-ci
Feb 27, 2026
Merged

Trigger CI on draft-to-ready PR conversion#1271
sbryngelson merged 1 commit intoMFlowCode:masterfrom
sbryngelson:fix/draft-to-ready-ci

Conversation

@sbryngelson
Copy link
Member

@sbryngelson sbryngelson commented Feb 26, 2026

Summary

  • Add ready_for_review to pull_request activity types in test.yml
  • Without this, converting a draft PR to ready-for-review does not re-trigger CI (including self-hosted jobs), requiring an empty commit or force-push as a workaround
  • GitHub Actions pull_request defaults to [opened, synchronize, reopened] — this adds ready_for_review to that list

Change

One line in .github/workflows/test.yml:

pull_request:
+   types: [opened, synchronize, reopened, ready_for_review]

Test plan

  • Create a draft PR, then convert to ready — verify self-hosted jobs trigger
  • Verify normal push-triggered CI still works as before

@sbryngelson sbryngelson marked this pull request as ready for review February 26, 2026 23:52
Copilot AI review requested due to automatic review settings February 26, 2026 23:52
coderabbitai[bot]

This comment was marked as outdated.

This comment was marked as outdated.

@MFlowCode MFlowCode deleted a comment from github-actions bot Feb 27, 2026
@MFlowCode MFlowCode deleted a comment from github-actions bot Feb 27, 2026
@MFlowCode MFlowCode deleted a comment from coderabbitai bot Feb 27, 2026
Add ready_for_review to pull_request activity types so self-hosted
tests run automatically when a PR is converted from draft to ready.
Previously this required an empty commit or force-push to re-trigger.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sbryngelson sbryngelson force-pushed the fix/draft-to-ready-ci branch from 448d80f to 552f0be Compare February 27, 2026 00:33
@github-actions
Copy link

Claude Code Review

Head SHA: 552f0be199923efb3faa8f534680afe645c9c1b2
Files changed: 1 — .github/workflows/test.yml
+1 / -0


Summary

  • Adds ready_for_review to the pull_request activity types list in test.yml, so CI auto-triggers when a PR is converted from draft to ready.
  • The other three types (opened, synchronize, reopened) match the GitHub Actions defaults that were previously implicit; making them explicit is safe and correct.
  • Change is minimal, targeted, and has no blast radius beyond CI trigger behavior.

Findings

No issues found.


Improvement Opportunities

  1. Document the implicit→explicit type change: The PR body already explains the motivation well. A short inline YAML comment (e.g., # explicit to include ready_for_review) could help future contributors understand why types are listed rather than relying on GitHub defaults, but this is purely cosmetic.

  2. Consider converted_to_draft: If desired, adding converted_to_draft as a cancel trigger (or relying on the existing concurrency block) is already handled — the concurrency: cancel-in-progress: true block will cancel in-flight runs when a new event arrives, so no action needed here.

Verdict: LGTM. Safe, one-line CI quality-of-life fix.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1412eb2 and 552f0be.

📒 Files selected for processing (1)
  • .github/workflows/test.yml

📝 Walkthrough

Walkthrough

This pull request modifies the GitHub Actions test workflow configuration to explicitly specify which pull request event types trigger the workflow. Instead of listening to all pull request events, the workflow now runs only on opened, synchronize, reopened, and ready_for_review events. This is a single-line addition to .github/workflows/test.yml that clarifies the workflow's trigger conditions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

size:XS

Poem

🐰 A workflow so swift, now knows when to leap,
With triggers precise—opened, synced, and deep,
No tests run in vain on each fleeting PR,
Just the right moments make our bunny ⭐

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding the ready_for_review trigger type to CI workflows so that draft-to-ready PR conversions automatically trigger CI jobs.
Description check ✅ Passed The description provides a clear summary of changes, the motivation (ready_for_review PR conversion now triggers CI), and a concrete test plan with verification steps, though it does not strictly follow the repository's template structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sbryngelson sbryngelson merged commit 5a2a8a4 into MFlowCode:master Feb 27, 2026
32 of 44 checks passed
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.05%. Comparing base (d048c4b) to head (552f0be).
⚠️ Report is 51 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1271      +/-   ##
==========================================
- Coverage   44.07%   44.05%   -0.02%     
==========================================
  Files          70       70              
  Lines       20431    20496      +65     
  Branches     1974     1991      +17     
==========================================
+ Hits         9004     9029      +25     
- Misses      10291    10328      +37     
- Partials     1136     1139       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants