# Auto approve/merge patch and minor npm updates

DevFeed: [Auto approve/merge patch and minor npm updates](<https://devfeed.tech/articles/auto-approve-merge-patch-and-minor-npm-updates-66612.md>)

Original publisher: [Read original article](<https://blog.devops.dev/auto-approve-merge-patch-and-minor-npm-updates-ed64ba0c4d00?source=rss----33f8b2d9a328---4>)

Author: Rizky R.

Published: 2026-10-07T10:39:20Z

Content type: article

Language: en

Sources: [DevOps.dev](<https://devfeed.tech/sources/devops-dev.md>)

Topics: [CI/CD](<https://devfeed.tech/topics/cicd.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>), [branch protection rules](<https://devfeed.tech/topics/branch-protection-rules.md>), [npm](<https://devfeed.tech/topics/npm.md>), [Dependabot](<https://devfeed.tech/topics/dependabot.md>), [npm packages](<https://devfeed.tech/topics/npm-packages.md>), [workflow automation](<https://devfeed.tech/topics/workflow-automation.md>), [npm security](<https://devfeed.tech/topics/npm-security.md>)

Tags: [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [cicd](<https://devfeed.tech/tags/cicd.md>), [dependabot](<https://devfeed.tech/tags/dependabot.md>), [dependency-cooldowns](<https://devfeed.tech/tags/dependency-cooldowns.md>), [devops](<https://devfeed.tech/tags/devops.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [merge](<https://devfeed.tech/tags/merge.md>), [min-release-age](<https://devfeed.tech/tags/min-release-age.md>), [npm](<https://devfeed.tech/tags/npm.md>), [patch](<https://devfeed.tech/tags/patch.md>)

## AI overview

The workflow automates approval and squash auto-merge for Dependabot npm minor and patch updates; major updates remain for manual review. It runs on selected pull request events, fetches Dependabot metadata, updates eligible branches that are behind, then approves, enables auto-merge, labels the PR, and comments that merging depends on checks passing. The repo uses a seven-day package release-age cooldown and branch protections including required checks and up-to-date branches. The author reports two caveats: PRs open longer than 30 days may still need manual handling, and GitHub may occasionally request manual workflow approval. The supplied excerpt also describes fixes for a missing checkout step and missing issue number in the comment API call.

## Source excerpt

Auto approve/merge patch and minor updates npm packages, Dependabot, CI/CD, GitHub Actions Photo by Diana Polekhina on Unsplash Repo: Walkable web app with Dependabot enabled CI/CD: GitHub Actions, merges blocked on failing checks I've had a backlog of various npm package dependency PRs opened by Dependabot that piled up in my web app's repo. It's tedious to manually update each PR (if they're out of date), read through the changelog, and click around to enable auto-merge once my automated checks pass. I wanted to automate this process for patch and minor updates as they're probably non-breaking, and save the clickops/manual review for major updates. I've set the following in my .npmrc to use dependency cooldowns as a simple method to minimise the risk of supply chain attacks: # Only install packages older than a week min-release-age=7 This tells Dependabot to ignore brand new releases of packages until they've been public for at least a week. Other relevant branch protection rules/settings in place to prevent wrongly speeding up breaking changes: CodeQL at high/higher severity must pass on PR's latest commit required_status_checks with strict_required_status_checks_policy: true : requires PR branch to be up to date with main before merging. Linear history required Commits must be signed, either by SSH key or GPG (if done by GitHub) Merges blocked if CodeQL reports code errors (unlikely to apply for dependency bumps) GitHub Actions allowed to create and approve pull requests in Settings > Actions > Workflow permissions I found a reference workflow that runs on every Dependabot PR, checks the update type, and enables auto-merge for minor/patch updates. It still doesn't approve the PR, so an update would sit around waiting for me to approve, if the checks even passed. Implementation My .github/dependabot.yml's npm block runs on a weekly schedule with its own cooldown option: - package-ecosystem: npm directory: / schedule: interval: weekly time: "00:00" timezone: "Asia