From 3420ca3933d0b573fb8310fbba0a16c146486b99 Mon Sep 17 00:00:00 2001 From: Vinicius Aquino Date: Tue, 6 Jul 2021 17:07:16 -0300 Subject: cicd: Use pull_request_target instead of pull_request When a PR comes from a forked repo, use pull_request_target as event type instead of pull_request. Signed-off-by: Vinicius Aquino --- .github/workflows/backport.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml index 43245301..54dce5bc 100644 --- a/.github/workflows/backport.yaml +++ b/.github/workflows/backport.yaml @@ -1,6 +1,6 @@ name: Backport labeled merged pull requests on: - pull_request: + pull_request_target: types: [closed] issue_comment: types: [created] @@ -12,11 +12,11 @@ jobs: # or when a comment containing `/backport` is created if: > ( - github.event_name == 'pull_request' && - github.event.pull_request.merged + github.event_name == 'pull_request_target' && + github.event.pull_request_target.merged ) || ( github.event_name == 'issue_comment' && - github.event.issue.pull_request && + github.event.issue.pull_request_target && contains(github.event.comment.body, '/backport') ) steps: -- cgit v1.2.3-54-g00ecf