intermediate

Required checks

Protect main branches with mandatory status checks, reviews, and deployment rules that match real release risk.

Required checks turn CI results into merge policy. Protected branches can require status checks, reviews, signed commits, linear history, or deployment approvals before code reaches main.

| Control | Purpose | |---------|---------| | Required status checks | Block merge on failing CI | | Review count | Human verification | | Environment rules | Gate production deploy |

Fast gates run on every PR; deeper suites may run on main or nightly while still blocking release. Emergency bypass needs audit trail and post-incident review.

On interviews: mapping checks to risk, optional versus required for critical paths, bypass procedures.

Common pitfalls: required checks that do not reflect real risk create bureaucracy; optional checks on critical paths let regressions through.

The trade-off is merge safety versus developer velocity and on-call toil when gates are mis-tuned.

Checklist:

  • Require checks that protect main.
  • Keep gate names understandable in PR UI.
  • Document emergency bypass rules.
  • Revisit required list when pipeline changes.