Skip to content

Commit 1850425

Browse files
committed
fix: remove duplicate conditional logic from reusable workflows
The reusable workflows had duplicate conditions that don't work properly in workflow_call context since github.event.pull_request is not available. The main test.yml workflow already handles these conditions correctly.
1 parent 8871269 commit 1850425

File tree

5 files changed

+0
-9
lines changed

5 files changed

+0
-9
lines changed

.github/workflows/reusable-examples.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ on:
2727
jobs:
2828
examples:
2929
runs-on: ubuntu-latest
30-
if: (github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || github.event_name == 'schedule'
3130
steps:
3231
- uses: actions/checkout@v3
3332
with:

.github/workflows/reusable-java-test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
java-version: ${{ fromJSON(inputs.java-versions) }}
3939
platform: ${{ fromJSON(inputs.platforms) }}
4040
runs-on: ${{ matrix.platform }}
41-
if: (github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || github.event_name == 'schedule'
4241
steps:
4342
- name: Checkout code
4443
uses: actions/checkout@v3

.github/workflows/reusable-javadoc.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on:
2222
jobs:
2323
javadoc:
2424
runs-on: ubuntu-latest
25-
if: (github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || github.event_name == 'schedule'
2625
steps:
2726
- uses: actions/checkout@v3
2827
with:

.github/workflows/reusable-pre-commit.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ on:
2222
jobs:
2323
pre-commit:
2424
runs-on: ubuntu-latest
25-
if: >
26-
(github.event.pull_request.draft == false &&
27-
!contains(github.event.pull_request.labels.*.name, 'ci/skip') &&
28-
!contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) ||
29-
github.event_name == 'schedule'
3025
steps:
3126
- name: Get GitHub App token
3227
if: inputs.enable-commit-changes && github.event.pull_request.head.repo.full_name == github.repository

.github/workflows/reusable-shading.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on:
2222
jobs:
2323
shading:
2424
runs-on: ubuntu-latest
25-
if: (github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || github.event_name == 'schedule'
2625
steps:
2726
- uses: actions/checkout@v3
2827
with:

0 commit comments

Comments
 (0)