Actions: per-required-check merge gating for PRs (actions-009)#30
Actions: per-required-check merge gating for PRs (actions-009)#30jaeyunha wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c2122033b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| total_count: required_status_checks.len() as i64, | ||
| completed_count: row.get("completed_count"), | ||
| failed_count: row.get("failed_count"), | ||
| missing_count: (required_status_checks.len() as i64 - required_count).max(0), |
There was a problem hiding this comment.
Gate rerun required checks on the latest row
When a required job is re-run after a successful completion, rerun_workflow_run creates another workflow_jobs row with the same name, so sync_check_runs_for_head_sha inserts a second check_runs row for that required context. This gate counts rows but sets total_count to the number of configured contexts; with one old successful ci/test row and one new queued ci/test row, completed_count == total_count == 1, so no pending blocker is added and the PR can merge while the required rerun is still running. The same row-counting can also hide a missing required context when duplicate rows for another context exist; collapse to one current result per required context before comparing.
Useful? React with 👍 / 👎.
Adds RequiredCheckGate logic so PR merge gating filters by required check names instead of coarse total-count logic.
—
Preserved from QA-worktree cleanup on 2026-06-16. Web QA: biome lint clean; vitest green where unit tests exist. Rust build/test not run locally (would regenerate large target dirs). Opened against
stagingfor review.🤖 Generated with Claude Code