Skip to content

Commit 327d0f1

Browse files
authored
[Fix] workflow(owner-notification): fix workflow error (#756)
Signed-off-by: samzong <[email protected]>
1 parent 7384093 commit 327d0f1

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/owner-notification.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)