-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 1.08 KB
/
Copy pathdependabot-automerge.yml
File metadata and controls
33 lines (29 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Dependabot auto-merge
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: write
pull-requests: write
jobs:
automerge:
if: github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Fetch Dependabot metadata
id: meta
uses: dependabot/fetch-metadata@v2.4.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Auto-merge minor and patch updates only — major updates go to a
# human review queue. github-actions and dev-only npm minor/patch are
# the safest categories and historically clean every time CI passes.
- name: Enable auto-merge for safe updates
if: |
steps.meta.outputs.update-type == 'version-update:semver-minor' ||
steps.meta.outputs.update-type == 'version-update:semver-patch'
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr merge --auto --squash "$PR_URL"