-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
|
GitHub can only block merging based on required status checks. If a check is not marked “required”, the PR can still be mergeable while other Actions jobs are in progress or even failing.  So to “block merge while anything is still running”, you have two options: If you want a more elegant UX, enable Merge Queue so merges only happen after required checks pass on the queued merge. |
Beta Was this translation helpful? Give feedback.
-
|
This is a solid pattern (one “gate” check that summarizes the rest), especially with matrix-heavy workflows. If it helps: we’ve been building a GitHub App that adds a single PR check focused on architecture drift / change-risk (keeps the output short + actionable, not a wall of comments). |
Beta Was this translation helpful? Give feedback.
-
|
Why is it even the case? If I configured a required check, merge must be blocked till the check is green. If the check is never scheduled, it will be my problem. Our pipeline contains of multiple jobs and one of them is matrix one. We get PRs automatically merged before the whole matrix finished from time to time. |
Beta Was this translation helpful? Give feedback.
-
|
The "Composite Success" Job (Recommended) YAML jobs: lint: This is the job you set as "Required" in Branch Protectiongatekeeper: |
Beta Was this translation helpful? Give feedback.



Yep — if the gate job uses needs:, GitHub won’t show that check until dependencies finish, so it can’t block merges early. Workaround: start a required required job immediately and have it poll the workflow run until all other jobs finish, then fail if any failed
`name: CI
on: { pull_request: {} }
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- run: echo "tests..."
required:
runs-on: ubuntu-latest
if: ${{ always() }}
permissions: { actions: read }
steps:
- uses: actions/github-script@v7
with:
script: |
const { owner, repo } = context.repo, run_id = context.runId;
const sleep = ms => new Promise(r => setTimeout(r, ms));
while (true) {
const jobs = await github.paginate(github.rest.actions…