File tree Expand file tree Collapse file tree 4 files changed +16
-7
lines changed
Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 1- name : ' List Pull Requests '
1+ name : ' List pull requests '
22description : ' list and put output pull requests'
33inputs :
44 owner :
@@ -34,16 +34,16 @@ runs:
3434 github-token : ${{ inputs.token }}
3535 result-encoding : string
3636 script : |
37- const timeRange = parseInt("24 ") * 60 * 60 * 1000;
37+ const timeRange = parseInt("${{ inputs.hours }} ") * 60 * 60 * 1000;
3838 const sinceTime = new Date(Date.now() - timeRange).toISOString();
39- const input_labels = "";
39+ const input_labels = "${{ inputs.labels }} ";
4040 const labels = input_labels
4141 ? input_labels.split(/[,\n]/).map(label => label.trim())
4242 : [];
4343
4444 const iterator = await github.paginate.iterator(github.rest.pulls.list, {
45- owner: "pytorch ",
46- repo: "pytorch ",
45+ owner: "${{ inputs.owner }} ",
46+ repo: "${{ inputs.repository }} ",
4747 state: "open",
4848 sort: "created",
4949 direction: "desc",
Original file line number Diff line number Diff line change 7171
7272# Only cancel the previous runs when triggered by a pull_request event
7373concurrency :
74- group : ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
74+ group : ${{ github.workflow }}
7575 cancel-in-progress : ${{ github.event_name == 'pull_request' }}
7676
7777jobs :
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
Original file line number Diff line number Diff line change 66
77jobs :
88 redispatch-pr-event :
9- name : Redispatch PyTorch events
9+ name : ' Redispatch PyTorch events for #${{ github.event.client_payload.pull_request.number }} '
1010 runs-on : ubuntu-latest
1111 steps :
1212 - name : Checkout
You can’t perform that action at this time.
0 commit comments