diff --git a/.github/workflows/cpplint.yml b/.github/workflows/cpplint.yml index 6ea139dfb..f8d6847ab 100644 --- a/.github/workflows/cpplint.yml +++ b/.github/workflows/cpplint.yml @@ -6,8 +6,9 @@ jobs: build: runs-on: ubuntu-latest - # prevent push event from triggering if it's part of a PR - if: github.event_name != 'push' || github.event.pull_request == null + # prevent push event from triggering if it's part of a local PR, see + # https://github.com/orgs/community/discussions/57827#discussioncomment-6579237 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/yarnlint.yml b/.github/workflows/yarnlint.yml index 165235ff7..229a93db3 100644 --- a/.github/workflows/yarnlint.yml +++ b/.github/workflows/yarnlint.yml @@ -6,8 +6,9 @@ jobs: build: runs-on: ubuntu-latest - # prevent push event from triggering if it's part of a PR - if: github.event_name != 'push' || github.event.pull_request == null + # prevent push event from triggering if it's part of a local PR, see + # https://github.com/orgs/community/discussions/57827#discussioncomment-6579237 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name defaults: run: diff --git a/.github/workflows/yarnprettier.yml b/.github/workflows/yarnprettier.yml index d288c8b90..260a19ba5 100644 --- a/.github/workflows/yarnprettier.yml +++ b/.github/workflows/yarnprettier.yml @@ -6,8 +6,9 @@ jobs: build: runs-on: ubuntu-latest - # prevent push event from triggering if it's part of a PR - if: github.event_name != 'push' || github.event.pull_request == null + # prevent push event from triggering if it's part of a local PR, see + # https://github.com/orgs/community/discussions/57827#discussioncomment-6579237 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name defaults: run: