Skip to content

Actions: per-required-check merge gating for PRs (actions-009)#30

Open
jaeyunha wants to merge 1 commit into
stagingfrom
qa/actions-009-visible-202605140034
Open

Actions: per-required-check merge gating for PRs (actions-009)#30
jaeyunha wants to merge 1 commit into
stagingfrom
qa/actions-009-visible-202605140034

Conversation

@jaeyunha

Copy link
Copy Markdown
Member

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 staging for review.

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +7665 to +7668
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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant