Delivery checks

Delivery check 01: Is branch protection on for every repo?

Branch protection is the cheapest safety net a team can have. It takes a minute to switch on and it stops the one mistake every team makes sooner or later: a change that lands on main without anyone looking at it.

Why one repo is enough

Most teams protect the main repo and forget the rest. The infrastructure repo, the shared library and the small service somebody started last year often have no rules at all. An untested change in any of them can still reach production.

How to check

In GitHub, open Settings → Branches for each repo. Or ask the API, one repo at a time:

# ask GitHub for the protection rules on main
gh api repos/acme-org/checkout-api/branches/main/protection

# a 404 "Branch not protected" means: no rules at all

What good looks like

  • Direct pushes to main are blocked.
  • At least one review is required before merge.
  • The rules apply to administrators too.

Checking this by hand works for three repos. For thirty, it does not. That is the first check in the Mekova free scan.

Check all your repos in 60 seconds

Join the scan waitlist

More delivery checks.