File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -32,18 +32,19 @@ runs:
3232 id : list-pr
3333 with :
3434 github-token : ${{ inputs.token }}
35+ debug : true
3536 result-encoding : string
3637 script : |
37- const timeRange = parseInt("24 ") * 60 * 60 * 1000;
38+ const timeRange = parseInt("${{ inputs.hours }} ") * 60 * 60 * 1000;
3839 const sinceTime = new Date(Date.now() - timeRange).toISOString();
39- const input_labels = "";
40+ const input_labels = "${{ inputs.labels }} ";
4041 const labels = input_labels
4142 ? input_labels.split(/[,\n]/).map(label => label.trim())
4243 : [];
4344
4445 const iterator = await github.paginate.iterator(github.rest.pulls.list, {
45- owner: "pytorch ",
46- repo: "pytorch ",
46+ owner: "${{ inputs.owner }} ",
47+ repo: "${{ inputs.repository }} ",
4748 state: "open",
4849 sort: "created",
4950 direction: "desc",
Original file line number Diff line number Diff line change 8383 image : ${{ steps.set-env.outputs.image }}
8484 device : ${{ steps.set-env.outputs.device }}
8585 ref : ${{ steps.list-ref.outputs.ref }}
86+ pr-number : ${{ steps.list-ref.outputs.pr-number }}
8687 steps :
8788 - name : Set environment params
8889 id : set-env
Original file line number Diff line number Diff line change 11name : ' Dispatch PyTorch events'
22
33on :
4+ pull_request :
5+ branches :
6+ - ' main'
7+ paths :
8+ - ' .github/workflows/dispatch-event.yml'
9+ - ' .github/actions/list-pr/**'
10+ - ' !**/*.md'
11+
412 schedule :
513 - cron : ' 0 12 * * *'
614
You can’t perform that action at this time.
0 commit comments