From d8752276292b3424051e33b0d433cc3986ce666c Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 17 Apr 2025 08:49:52 -0700 Subject: [PATCH] Enhance path filters action to set outputs for all changes when not a PR (#25367) --- .../infrastructure/path-filters/action.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/actions/infrastructure/path-filters/action.yml b/.github/actions/infrastructure/path-filters/action.yml index 58255fab55..78426bdff0 100644 --- a/.github/actions/infrastructure/path-filters/action.yml +++ b/.github/actions/infrastructure/path-filters/action.yml @@ -35,6 +35,23 @@ runs: with: github-token: ${{ inputs.GITHUB_TOKEN }} script: | + console.log(`Event Name: ${context.eventName}`); + + // Just say everything changed if this is not a PR + if (context.eventName !== 'pull_request') { + console.log('Not a pull request, setting all outputs to true'); + core.setOutput('toolsChanged', true); + core.setOutput('githubChanged', true); + core.setOutput('propsChanged', true); + core.setOutput('testsChanged', true); + core.setOutput('mainSourceChanged', true); + core.setOutput('buildModuleChanged', true); + core.setOutput('source', true); + return; + } + + console.log(`Getting files changed in PR #${context.issue.number}`); + // Fetch the list of files changed in the PR let files = []; let page = 1;