Merge pull request #152 from Ossanes/topic/cicd-pull-request-target

cicd: Use pull_request_target instead of pull_request
This commit is contained in:
Otavio Salvador 2021-07-06 18:15:26 -03:00 committed by GitHub
commit de6e95c484
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
name: Backport labeled merged pull requests name: Backport labeled merged pull requests
on: on:
pull_request: pull_request_target:
types: [closed] types: [closed]
issue_comment: issue_comment:
types: [created] types: [created]
@ -12,11 +12,11 @@ jobs:
# or when a comment containing `/backport` is created # or when a comment containing `/backport` is created
if: > if: >
( (
github.event_name == 'pull_request' && github.event_name == 'pull_request_target' &&
github.event.pull_request.merged github.event.pull_request_target.merged
) || ( ) || (
github.event_name == 'issue_comment' && github.event_name == 'issue_comment' &&
github.event.issue.pull_request && github.event.issue.pull_request_target &&
contains(github.event.comment.body, '/backport') contains(github.event.comment.body, '/backport')
) )
steps: steps: