Skip to content

chore: harden global-deny hook (#63) #24

chore: harden global-deny hook (#63)

chore: harden global-deny hook (#63) #24

name: Dependabot auto-merge
on: pull_request
# Default to read-all at top level; the automerge job below escalates only the
# narrow scopes it actually needs. Per OpenSSF Scorecard's Token-Permissions
# criterion: avoid blanket write at the workflow level.
permissions: read-all
jobs:
automerge:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
permissions:
contents: write # required to enable auto-merge
pull-requests: write # required to mark the PR as auto-merge
steps:
- name: Fetch Dependabot metadata
id: meta
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3
- name: Enable auto-merge for patch updates
if: steps.meta.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}