-
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 955 Bytes
/
auto-merge-bots.yml
File metadata and controls
35 lines (30 loc) · 955 Bytes
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
34
35
name: Auto-merge Bot PRs
on:
pull_request_target:
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: dependabot/fetch-metadata@v3
id: meta
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Auto-merge minor and patch updates
if: steps.meta.outputs.update-type != 'version-update:semver-major'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pre-commit-ci:
if: github.actor == 'pre-commit-ci[bot]'
runs-on: ubuntu-latest
steps:
- name: Auto-merge pre-commit.ci updates
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}