diff --git a/.github/workflows/automerge.yml b/.github/workflows/auto-merge.yml similarity index 50% rename from .github/workflows/automerge.yml rename to .github/workflows/auto-merge.yml index cd26b83..1d6da00 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/auto-merge.yml @@ -1,4 +1,4 @@ -name: Dependabot auto-merge +name: Auto-merge on: pull_request permissions: @@ -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}}