From 47df7b4b17d8239e63ac22e6a412d56a1b4a1757 Mon Sep 17 00:00:00 2001 From: German Date: Thu, 23 Feb 2023 20:10:34 +0700 Subject: [PATCH] Implementing approver --- .github/workflows/approver.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/approver.yml diff --git a/.github/workflows/approver.yml b/.github/workflows/approver.yml new file mode 100644 index 00000000..e2d6fe6a --- /dev/null +++ b/.github/workflows/approver.yml @@ -0,0 +1,22 @@ +name: Approve PRs +on: + workflow_dispatch: + issue_comment: + types: [created, edited] + +jobs: + autoapprove: + # This job only runs for pull request comments + name: PR comment + if: ${{ github.event.issue.pull_request }} + permissions: + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: hmarr/auto-approve-action@v3 + if: | + contains(github.event.comment.body, 'LGTM') && contains(github.event.comment.user.login, 'germa89') + with: + review-message: ":white_check_mark: Approving this PR because ${{ github.event.comment.user.login }} said so :grimacing:" + pull-request-number: ${{ github.event.issue.number }} + github-token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} \ No newline at end of file