Switch event to use pull_request_target (#2807)

The pull_request_target event is like pull_request, but runs in the
context of the target repo (Velero, in this case), instead of the fork.
This allows us to use the GitHub token secret as expected.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
Nolan Brubaker
2020-08-11 13:57:16 -04:00
committed by GitHub
parent a68e5fc330
commit 5b28d70e49

View File

@@ -1,5 +1,10 @@
name: 'Auto Assign PR Reviewers'
on: pull_request
# pull_request_target means that this will run on pull requests, but in the context of the base repo.
# This should mean PRs from forks are supported.
on:
pull_request_target:
types: [opened, reopened, sychronized]
jobs:
add-reviews: