Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
ci: add contributors auto merge job
Browse files Browse the repository at this point in the history
  • Loading branch information
hanspagel committed Feb 27, 2024
1 parent 0e98fdb commit 118cbcd
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dependabot auto-merge
name: Auto-merge
on: pull_request

permissions:
Expand All @@ -25,3 +25,19 @@ jobs:
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
contributors:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'github-actions[bot]'
steps:
- name: Approve PR
if: contains(github.event.pull_request.title, 'docs(contributor)')
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GH_PERSONAL_ACCESS_TOKEN}}
- name: Enable auto-merge
if: contains(github.event.pull_request.title, 'docs(contributor)')
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GH_PERSONAL_ACCESS_TOKEN}}

0 comments on commit 118cbcd

Please sign in to comment.