From bb651465087c130fa75d0604474cbaf3dd2d21e6 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 28 Apr 2023 23:54:56 -0400 Subject: [PATCH] Create auto-approve-dominions-prs.yml Because no one else maintains this project but me :( --- .../workflows/auto-approve-dominions-prs.yml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/auto-approve-dominions-prs.yml diff --git a/.github/workflows/auto-approve-dominions-prs.yml b/.github/workflows/auto-approve-dominions-prs.yml new file mode 100644 index 0000000000..d481b114e3 --- /dev/null +++ b/.github/workflows/auto-approve-dominions-prs.yml @@ -0,0 +1,25 @@ +# At the time of writing this, I'm the only maintainer and I want the proper branch protections in place +# So I'm setting up actions to auto-approve my work, since no one else does :( +# - Dominion <3 +name: "Auto-Approve Dominion's PRs" + +on: + pull_request: + types: [opened, synchronize] + branches: + - dev + - master + +jobs: + approve-pr-if-dominion-is-author: + name: Approve PR if Dominion is Author + if: github.event.pull_request.user.login == 'Cyberboss' + runs-on: ubuntu-latest + steps: + - name: GitHub API Call + run: | + curl --request POST \ + --url https://api.github.com/repos/${{github.repository}}/pulls/${{github.event.number}}/reviews \ + --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + --header 'content-type: application/json' \ + -d '{"event":"APPROVE"}'