auto-merge
March 20, 2026 · View on GitHub
The auto-merge reusable action is located at .github/actions/auto-merge.yml.
This workflow approves Dependabot pull requests that are eligible (non-breaking, no maintainer changes), and auto-merges them when all required checks pass.
To use it you will need a Personal Access Token with the following scopes:
repofor private repositoriespublic_repofor public repositories
NOTE: This action only processes pull requests opened by Dependabot.
In the repository that will call this action, you need to define a secret named AUTOMERGE_TOKEN with the value of your Personal Access Token.
This reusable action depends on the following actions:
Eligibility
A pull request is considered eligible for auto-approve/merge if it is not a breaking change. Per semantic versioning, the following are considered breaking:
- Major version updates (e.g.,
1.x.x→2.x.x) - Minor version updates for
0.xversions (e.g.,0.1.x→0.2.x) - Patch version updates for
0.0.xversions (e.g.,0.0.1→0.0.2) - Any update where the package maintainer has changed
Inputs
Required inputs
Optional inputs
The action has the following optional inputs:
auto-approve
Approve eligible pull requests (no breaking changes, no maintainer changes).
- This
inputis optional with a default oftrue.
auto-merge (input)
Merge eligible pull requests (when all required checks pass).
- This
inputis optional with a default offalse.
Usage
In the repository that will call this action, you will need to add a .github/workflows/auto-merge.yml file with the following content:
With defaults (auto-approve only)
name: auto-merge
on:
pull_request_target:
permissions:
contents: read
jobs:
auto-merge:
if: github.repository_owner == 'mdn'
uses: mdn/workflows/.github/workflows/auto-merge.yml@main
secrets:
GH_TOKEN: ${{ secrets.AUTOMERGE_TOKEN }}
With auto-merge enabled
name: auto-merge
on:
pull_request_target:
permissions:
contents: read
jobs:
auto-merge:
if: github.repository_owner == 'mdn'
uses: mdn/workflows/.github/workflows/auto-merge.yml@main
with:
auto-merge: true
secrets:
GH_TOKEN: ${{ secrets.AUTOMERGE_TOKEN }}