Skip to content

Commit

Permalink
Auto merge pre-commit auto updates (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt authored Jan 15, 2024
1 parent a1b9966 commit 1328029
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Auto Merge

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]

jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- name: Label PR
if: github.event.pull_request.title == '[pre-commit.ci] pre-commit autoupdate'
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
-d '{"labels":["automerge"]}'
- name: Automatic Merge
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 1328029

Please sign in to comment.