Skip to content

Commit 92758a6

Browse files
committed
update
1 parent 10d65ea commit 92758a6

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/actions/list-pr/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ runs:
3232
id: list-pr
3333
with:
3434
github-token: ${{ inputs.token }}
35-
result-encoding: json
35+
result-encoding: string
3636
script: |
3737
const timeRange = parseInt("24") * 60 * 60 * 1000;
3838
const sinceTime = new Date(Date.now() - timeRange).toISOString();
@@ -70,7 +70,7 @@ runs:
7070
core.info(`prs: ${pr_urls.join("\n")}`);
7171
}
7272
73-
return prs.map(pr => ({
73+
const result = prs.map(pr => ({
7474
number: pr.number,
7575
title: pr.title,
7676
body: pr.body,
@@ -85,3 +85,5 @@ runs:
8585
head: pr.head.ref,
8686
labels: pr.labels.map(label => label.name),
8787
}));
88+
89+
return JSON.stringify(result);

.github/workflows/dispatch-event.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
repository: pytorch
3636
hours: 24
3737

38+
- name: Print pull request info
39+
run: |
40+
echo ${{ steps.list-pr.outputs.prs }}
41+
3842
dispatch-pr:
3943
name: 'Dispatch PR event - #${{ matrix.pr.number }}'
4044
runs-on: ubuntu-latest
@@ -44,7 +48,7 @@ jobs:
4448
fail-fast: false
4549
max-parallel: 1
4650
matrix:
47-
pr: ${{ needs.list-pr.outputs.prs }}
51+
pr: ${{ fromJson(needs.list-pr.outputs.prs) }}
4852
steps:
4953
- name: Print pull request info
5054
run: |

0 commit comments

Comments
 (0)