Skip to content

Commit d875227

Browse files
authored
Enhance path filters action to set outputs for all changes when not a PR (PowerShell#25367)
1 parent a141246 commit d875227

File tree

1 file changed

+17
-0
lines changed
  • .github/actions/infrastructure/path-filters

1 file changed

+17
-0
lines changed

.github/actions/infrastructure/path-filters/action.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,23 @@ runs:
3535
with:
3636
github-token: ${{ inputs.GITHUB_TOKEN }}
3737
script: |
38+
console.log(`Event Name: ${context.eventName}`);
39+
40+
// Just say everything changed if this is not a PR
41+
if (context.eventName !== 'pull_request') {
42+
console.log('Not a pull request, setting all outputs to true');
43+
core.setOutput('toolsChanged', true);
44+
core.setOutput('githubChanged', true);
45+
core.setOutput('propsChanged', true);
46+
core.setOutput('testsChanged', true);
47+
core.setOutput('mainSourceChanged', true);
48+
core.setOutput('buildModuleChanged', true);
49+
core.setOutput('source', true);
50+
return;
51+
}
52+
53+
console.log(`Getting files changed in PR #${context.issue.number}`);
54+
3855
// Fetch the list of files changed in the PR
3956
let files = [];
4057
let page = 1;

0 commit comments

Comments
 (0)