chore: add PR automation workflows for triage, formatting, staleness, and overlap detection (#263)

This commit is contained in:
Matt Kane
2026-04-05 08:03:06 +01:00
committed by GitHub
parent 9d10d2791f
commit c4977e1fd1
9 changed files with 864 additions and 52 deletions

View File

@@ -0,0 +1,35 @@
name: Dependabot Auto-Approve
on:
pull_request:
branches: [main]
permissions:
contents: read
pull-requests: write
jobs:
approve:
name: Auto-Approve
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444e40b2048 # v2.4.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Auto-approve patch and minor updates
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
await github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'APPROVE',
body: 'Auto-approved: ${{ steps.metadata.outputs.update-type }} update for ${{ steps.metadata.outputs.dependency-names }}.',
});