Skip to content

Commit b0202d3

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 6ae5403 commit b0202d3

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

.github/workflows/reusable-examples.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ on:
2222
jobs:
2323
examples:
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
env:
3126
DD_PROFILING_NO_EXTENSION: true
3227
steps:

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ env:
2626
jobs:
2727
pre-commit:
2828
runs-on: ubuntu-latest
29-
if: >
30-
(github.event.pull_request.draft == false &&
31-
!contains(github.event.pull_request.labels.*.name, 'ci/skip') &&
32-
!contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) ||
33-
github.event_name == 'schedule'
3429
steps:
3530
- name: Get GitHub App token
3631
id: get_token

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jobs:
4343
ruby-version: ${{ fromJSON(inputs.ruby-versions) }}
4444
platform: ${{ fromJSON(inputs.platforms) }}
4545
runs-on: ${{ matrix.platform }}
46-
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'
4746
env:
4847
BUNDLE_WITHOUT: docs
4948
DD_PROFILING_NO_EXTENSION: true

0 commit comments

Comments
 (0)