Skip to content

Commit 9549afc

Browse files
pierlonwestonruter
andcommitted
Simplify conditions
Co-authored-by: Weston Ruter <[email protected]>
1 parent 5603bf3 commit 9549afc

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.github/workflows/build-test-measure.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,16 @@ jobs:
111111
- name: Generate ESLint coding standard violations report
112112
# Prevent generating the ESLint report if PR is from a fork or authored by Dependabot.
113113
if: >
114-
github.event.pull_request.head.repo.fork == false &&
115-
github.event.pull_request.user.login != 'dependabot'
114+
! ( github.event.pull_request.head.repo.fork == true ||
115+
github.event.pull_request.user.login == 'dependabot' )
116116
run: npm run lint:js:report
117117
continue-on-error: true
118118

119119
- name: Annotate code linting results
120120
# The action cannot annotate the PR when run from a PR fork or was authored by Dependabot.
121121
if: >
122-
github.event.pull_request.head.repo.fork == false &&
123-
github.event.pull_request.user.login != 'dependabot'
122+
! ( github.event.pull_request.head.repo.fork == true ||
123+
github.event.pull_request.user.login == 'dependabot' )
124124
uses: ataylorme/[email protected]
125125
with:
126126
repo-token: '${{ secrets.GITHUB_TOKEN }}'
@@ -665,7 +665,8 @@ jobs:
665665
name: 'Build: ${{ matrix.build }} build ZIP'
666666
# Only run if the PR was not authored by Dependabot and it is not a draft or not from a fork.
667667
if: >
668-
( github.event.pull_request.draft || github.event.pull_request.head.repo.fork ) == false &&
668+
github.event.pull_request.draft == false &&
669+
github.event.pull_request.head.repo.fork == false &&
669670
github.event.pull_request.user.login != 'dependabot'
670671
runs-on: ubuntu-latest
671672
needs:

.github/workflows/qa-integrate.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,16 @@ jobs:
8080
- name: Generate ESLint coding standard violations report
8181
# Prevent generating the ESLint report if PR is from a fork or authored by Dependabot.
8282
if: >
83-
github.event.pull_request.head.repo.fork == false &&
84-
github.event.pull_request.user.login != 'dependabot'
83+
! ( github.event.pull_request.head.repo.fork == true ||
84+
github.event.pull_request.user.login == 'dependabot' )
8585
run: npm run lint:js:report
8686
continue-on-error: true
8787

8888
- name: Annotate code linting results
8989
# The action cannot annotate the PR when run from a PR fork or was authored by Dependabot.
9090
if: >
91-
github.event.pull_request.head.repo.fork == false &&
92-
github.event.pull_request.user.login != 'dependabot'
91+
! ( github.event.pull_request.head.repo.fork == true ||
92+
github.event.pull_request.user.login == 'dependabot' )
9393
uses: ataylorme/[email protected]
9494
with:
9595
repo-token: '${{ secrets.GITHUB_TOKEN }}'
@@ -211,7 +211,8 @@ jobs:
211211
needs: [unit-test-php]
212212
# Only run if the PR was not authored by Dependabot and it is not a draft or not from a fork.
213213
if: >
214-
( github.event.pull_request.draft || github.event.pull_request.head.repo.fork ) == false &&
214+
github.event.pull_request.draft == false &&
215+
github.event.pull_request.head.repo.fork == false &&
215216
github.event.pull_request.user.login != 'dependabot'
216217
runs-on: ubuntu-latest
217218
outputs:

0 commit comments

Comments
 (0)