A bot should auto-merge Dependabot patch updates when CI passes.
BeginnerScenarioGitHub Actions
Answer
Situation read → Automate low-risk updates safely.
What I'd do →
- Use
dependabot/fetch-metadatato readupdate-type. - If
version-update:semver-patch, rungh pr merge --auto --squash "$PR_URL"withGH_TOKENandpull-requests: write. - Enable "Allow auto-merge" and required checks on the repo.
Why → Auto-merge waits for required checks, so a failing update is never merged.
Interview tip → Limit to patch/minor of dev dependencies first.
More on GitHub Actions
What are workflows, jobs, steps and actions in GitHub Actions?BeginnerWhat events can trigger a workflow?BeginnerWhat is the difference between `pull_request` and `pull_request_target`?AdvancedWhat is a runner, and how do GitHub-hosted and self-hosted runners differ?BeginnerHow do you pass data between steps and between jobs?IntermediateHow does a build matrix work?Intermediate