Skip to content

fix(ci): add ready_for_review to check-sprint trigger types#180

Merged
lml2468 merged 1 commit into
mainfrom
fix/check-sprint-ready-for-review
May 31, 2026
Merged

fix(ci): add ready_for_review to check-sprint trigger types#180
lml2468 merged 1 commit into
mainfrom
fix/check-sprint-ready-for-review

Conversation

@lml2468
Copy link
Copy Markdown
Contributor

@lml2468 lml2468 commented May 31, 2026

Summary

Add ready_for_review to pull_request_target.types in check-sprint.yml.

Required companion change for Mininglamp-OSS/.github#51, which adds draft-PR skip to the reusable Sprint check workflow.

Why

Without ready_for_review in caller trigger types, marking a draft PR as ready does not re-trigger the Sprint check. The green "skipped" status cached on the draft SHA persists, allowing the now-ready PR to merge without Sprint validation.

Change

-    types: [opened, synchronize, reopened, ...]
+    types: [opened, synchronize, reopened, ..., ready_for_review]

Required companion change for Mininglamp-OSS/.github#51 which adds
draft-PR skip to reusable-check-sprint. Without ready_for_review in
caller types, marking a draft PR ready does not re-trigger the Sprint
check, leaving a stale green skipped status that can bypass the gate.
@lml2468 lml2468 requested a review from a team as a code owner May 31, 2026 13:00
@github-actions github-actions Bot added the size/XS PR size: XS label May 31, 2026
Copy link
Copy Markdown
Contributor

@Jerry-Xin Jerry-Xin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ APPROVED

One-line addition of ready_for_review to check-sprint.yml trigger types. Correct fix — Draft PRs converting to Ready previously skipped the sprint check because ready_for_review was not in the types list. No other workflow files are affected.

Copy link
Copy Markdown
Contributor

@yujiawei yujiawei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review — PR #180 (octo-web)

Verdict: APPROVED

A minimal, well-reasoned one-line CI fix. No blocking issues found.

Summary of change

Adds ready_for_review to pull_request_target.types in .github/workflows/check-sprint.yml:

-    types: [opened, synchronize, reopened, edited]
+    types: [opened, synchronize, reopened, edited, ready_for_review]

Assessment

Correctness — ✅
The fix addresses a real merge-gate bypass. The synchronize event fires on pushed commits, not on a draft→ready transition. So once the companion change (.github#51) makes the reusable Sprint workflow skip drafts, a draft PR receives a cached green "skipped" status. Without ready_for_review in the caller's trigger types, marking that PR ready never re-runs the Sprint check, and the stale "skipped" status persists — letting an unvalidated PR merge. Adding ready_for_review ensures the check re-runs at the moment the PR becomes mergeable.

Security — ✅
This workflow uses pull_request_target (elevated privileges, access to PROJECT_TOKEN). The file's own header comment confirms no PR code is checked out or executed, and the job only forwards the PR number / repo name to the org reusable workflow. Adding the ready_for_review trigger type does not expand the attack surface — it triggers the same trusted, no-checkout job on an additional event.

Completeness — ✅
The change is complete on its own and correctly depends on the companion PR (Mininglamp-OSS/.github#51) as documented in the PR description. permissions: {} remains correctly scoped.

Nits / suggestions (non-blocking)

  • Consider whether converted_to_draft is also worth handling for symmetry, so a PR moved back to draft re-evaluates state. Not required here — re-converting to draft would simply re-skip, which is harmless — so this is purely optional.

Conclusion

The change is correct, minimal, and closes a genuine validation-bypass gap. Approving.

@lml2468 lml2468 merged commit 2e84fc2 into main May 31, 2026
15 of 16 checks passed
@lml2468 lml2468 deleted the fix/check-sprint-ready-for-review branch May 31, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants