Required checks

How a branch protection rule that requires status checks decides which runs must pass before a pull request merges.

Last updated 18 November 2026View as Markdown

A branch protection rule with Require status checks to pass before merging makes CI runs a condition of the merge. Set the rule up as in Protect a branch. This page says how its checks are decided.

The protected branch decides

Which checks are required is decided by the protected branch, never by the pull request. A required check is a workflow file as it is on the protected branch. It passes only when a run of that version of the file succeeded on the commit being merged.

  • When the pull request leaves a required workflow alone, its own run is the check.
  • When it changes, renames or deletes one, CI also runs the protected branch's version on the pull request's commit, and only that run counts. A pull request cannot pass by editing the check away; a change to CI gates merges once it has landed. The same holds for merge queue builds.

Which checks are required

requiredChecks Required
Names The protected branch's workflows of those names. In GitHub-syntax workflows a name may also be a job's (its name: or its key): every matrix leg of it must pass, and a skipped job passes. A commit status reported for the commit with that name as its context also counts, when no run does. Other runs and statuses are shown but do not block.
Empty Every protected-branch workflow the pull request triggers, and every run and every commit status reported for the commit must be green.

A name that is neither a workflow or job on the protected branch nor a commit status reported for the commit blocks the merge with "required check … (not defined on main)". A required check with no run yet holds the merge with "waiting for …". When the rule names no checks and nothing at all has reported for the commit, the merge waits with "no CI run has reported for this commit yet".

Limits

A local action or a local reusable workflow that a required workflow calls (uses: ./…) is read from the commit under test. Protect those files with review, as you protect the code itself.

Did this page help you?