Skip to content

chore(deps)(deps): bump dependabot/fetch-metadata from 2.5.0 to 3.1.0 in the all-dependencies group across 1 directory #30

chore(deps)(deps): bump dependabot/fetch-metadata from 2.5.0 to 3.1.0 in the all-dependencies group across 1 directory

chore(deps)(deps): bump dependabot/fetch-metadata from 2.5.0 to 3.1.0 in the all-dependencies group across 1 directory #30

Workflow file for this run

name: Dependabot auto-merge
# Hardened against the CVE-2025-61671 pattern (and similar):
# * Trust the PR author via `github.event.pull_request.user.login` only as a
# coarse gate. The actual security boundary is the official
# dependabot/fetch-metadata action, which signs over the PR contents and
# exposes update-type / dependency metadata in a tamper-resistant way.
# * Only `version-update:semver-patch` and `version-update:semver-security`
# are eligible for `--merge`. Minor and major bumps get `--approve` only;
# a human must hit the merge button.
# * `gh pr merge --auto --squash` lets GitHub gate the actual merge on the
# repository's required status checks (configured via branch protection),
# so we do NOT need to wait for CI inside this workflow.
'on':
pull_request_target:
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
jobs:
automerge:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Fetch Dependabot metadata
id: meta
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Approve PR (all update types)
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr review --approve "$PR_URL"
- name: Enable auto-merge (patch + security only)
if: |
steps.meta.outputs.update-type == 'version-update:semver-patch' ||
steps.meta.outputs.update-type == 'version-update:semver-security'
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr merge --auto --squash "$PR_URL"