Interview Prep/Git & GitHub/Protection, Hooks and Policy

Dependabot opens 30 PRs a week. How do you merge them safely and quickly?

IntermediateScenarioProtection, Hooks and Policy
Answer

Situation read → Manual review of every patch bump does not scale.

What I'd do →

  1. Group updates in dependabot.yml (groups:) and set a weekly schedule.
  2. Enable auto-merge for patch and minor updates when all required checks pass:
gh pr merge --auto --squash "$PR_URL"
  1. Keep major updates for human review.
  2. Make sure tests are good, because auto-merge is only as safe as CI.

Why → Auto-merge removes toil, while branch protection keeps the safety net.

Interview tip → Restrict workflow permissions for the Dependabot actor.

All Git & GitHub questions Roadmap: Git & GitHub

More on Protection, Hooks and Policy