From 5b28d70e49b142edaca31dc42dfa1783420b03af Mon Sep 17 00:00:00 2001 From: Nolan Brubaker Date: Tue, 11 Aug 2020 13:57:16 -0400 Subject: [PATCH] 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 --- .github/workflows/auto_assign_prs.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto_assign_prs.yml b/.github/workflows/auto_assign_prs.yml index 3ff6ee45f..665936976 100644 --- a/.github/workflows/auto_assign_prs.yml +++ b/.github/workflows/auto_assign_prs.yml @@ -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: