Only run on `pull_request_review` if pull request is not from a fork. (#89183)

This commit is contained in:
Markus Reiter 2020-09-13 06:58:32 +02:00 committed by GitHub
parent 4f914ca088
commit eb6fd41c16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -25,7 +25,14 @@ on:
jobs:
automerge:
if: startsWith(github.repository, 'Homebrew/') && (github.event.review.state == 'approved' || !github.event.review)
if: >
startsWith(github.repository, 'Homebrew/') &&
(
(
github.event.review.state == 'approved' &&
github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name
) || github.event_name != 'pull_request_review'
)
runs-on: ubuntu-latest
steps:
- uses: reitermarkus/automerge@a3335f47360dda76f19a473df3522cf773c64627