@@ -23,12 +23,19 @@ jobs:
2323
2424 - name : Get changed files
2525 id : changed-files
26- uses : tj- actions/changed-files@v46
26+ uses : actions/github-script@v7
2727 with :
28- files : |
29- **/*
30- base_sha : ${{ github.event.pull_request.base.sha }}
31- sha : ${{ github.event.pull_request.head.sha }}
28+ result-encoding : string
29+ script : |
30+ // Retrieve changed files via GitHub API to avoid relying on fork refs
31+ const files = await github.paginate(github.rest.pulls.listFiles, {
32+ owner: context.repo.owner,
33+ repo: context.repo.repo,
34+ pull_number: context.issue.number,
35+ per_page: 100,
36+ });
37+ const filenames = files.map(f => f.filename);
38+ core.setOutput('all_changed_files', filenames.join(' '));
3239
3340 - name : Find owners and notify
3441 uses : actions/github-script@v7
5158 const ownerPath = path.join(firstLevelDir, 'OWNER');
5259 if (fs.existsSync(ownerPath)) {
5360 const content = fs.readFileSync(ownerPath, 'utf8');
54- const owners = content.split('\n')
55- .filter(line => line.trim().startsWith('@'))
56- .map(line => line.trim());
61+ const owners = content.split('\n')
62+ .filter(line => line.trim().startsWith('@'))
63+ .map(line => line.trim());
5764 if (owners.length > 0) {
5865 return { path: firstLevelDir, owners };
5966 }
0 commit comments