Skip to content

Commit

Permalink
Not running auto approver by default (#2576)
Browse files Browse the repository at this point in the history
Improving autoapprover so it does not run unless some user/comment is fulfilled.
  • Loading branch information
germa89 authored Dec 19, 2023
1 parent 836b961 commit bfd2b31
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/approver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,19 @@ on:
issue_comment:
types: [created, edited]

env:
# sintax: ("germa89" "author2")
ALLOWED_AUTHORS: ("germa89")

jobs:
autoapprove:
# This job only runs for pull request comments
name: PR comment
if: ${{ github.event.issue.pull_request }}
if: github.event.issue.pull_request &&
contains(github.event.comment.body, '@pyansys-ci-bot LGTM') && (
github.event.comment.user.login == 'germa89'
)
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v3
if: |
contains(github.event.comment.body, 'LGTM') && contains(env.ALLOWED_AUTHORS, github.event.comment.user.login)
with:
review-message: ":white_check_mark: Approving this PR because [${{ github.event.comment.user.login }}](https://github.com/${{ github.event.comment.user.login }}) said so in [here](${{ github.event.comment.html_url }}) :grimacing:"
pull-request-number: ${{ github.event.issue.number }}
Expand Down

0 comments on commit bfd2b31

Please sign in to comment.