From a4d5738a4e4a349aa5d63142b200d0116c2fe145 Mon Sep 17 00:00:00 2001 From: Alvin Huang <17609145+alvin-huang@users.noreply.github.com> Date: Wed, 3 Feb 2021 10:19:37 -0500 Subject: [PATCH] ci: fix pr file checker (#9694) * filter github pr file checker on the right labels object * only check PR files when the PR is opened --- .github/workflows/pr-file-checker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-file-checker.yml b/.github/workflows/pr-file-checker.yml index 469e3aba08..008c7bf50f 100644 --- a/.github/workflows/pr-file-checker.yml +++ b/.github/workflows/pr-file-checker.yml @@ -7,8 +7,8 @@ # never call any makefiles or scripts. It must never be changed to run any code from the checkout. on: pull_request_target: + types: [opened] # Runs on PRs to master and all release branches - # By default it triggers on opened, synchronize, or reopened PRs branches: - master - release/* @@ -17,7 +17,7 @@ jobs: # checks that a .changelog entry is present for a PR changelog-check: # If there a `pr/no-changelog` label we ignore this check - if: "!${{ contains(github.event.pull_request.label.*.name, 'pr/no-changelog')}}" + if: "!${{ contains(github.event.pull_request.labels.*.name, 'pr/no-changelog')}}" runs-on: ubuntu-latest steps: @@ -46,7 +46,7 @@ jobs: # checks that a 'type/docs-cherrypick' label is attached to PRs with website/ changes website-check: # If there's a `type/docs-cherrypick` label we ignore this check - if: "!${{ contains(github.event.pull_request.label.*.name, 'type/docs-cherrypick')}}" + if: "!${{ contains(github.event.pull_request.labels.*.name, 'type/docs-cherrypick')}}" runs-on: ubuntu-latest steps: