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 '
2
2
description : ' list and put output pull requests'
3
3
inputs :
4
4
owner :
@@ -34,16 +34,16 @@ runs:
34
34
github-token : ${{ inputs.token }}
35
35
result-encoding : string
36
36
script : |
37
- const timeRange = parseInt("24 ") * 60 * 60 * 1000;
37
+ const timeRange = parseInt("${{ inputs.hours }} ") * 60 * 60 * 1000;
38
38
const sinceTime = new Date(Date.now() - timeRange).toISOString();
39
- const input_labels = "";
39
+ const input_labels = "${{ inputs.labels }} ";
40
40
const labels = input_labels
41
41
? input_labels.split(/[,\n]/).map(label => label.trim())
42
42
: [];
43
43
44
44
const iterator = await github.paginate.iterator(github.rest.pulls.list, {
45
- owner: "pytorch ",
46
- repo: "pytorch ",
45
+ owner: "${{ inputs.owner }} ",
46
+ repo: "${{ inputs.repository }} ",
47
47
state: "open",
48
48
sort: "created",
49
49
direction: "desc",
Original file line number Diff line number Diff line change 71
71
72
72
# Only cancel the previous runs when triggered by a pull_request event
73
73
concurrency :
74
- group : ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
74
+ group : ${{ github.workflow }}
75
75
cancel-in-progress : ${{ github.event_name == 'pull_request' }}
76
76
77
77
jobs :
83
83
image : ${{ steps.set-env.outputs.image }}
84
84
device : ${{ steps.set-env.outputs.device }}
85
85
ref : ${{ steps.list-ref.outputs.ref }}
86
+ pr-number : ${{ steps.list-ref.outputs.pr_number }}
86
87
steps :
87
88
- name : Set environment params
88
89
id : set-env
Original file line number Diff line number Diff line change 1
1
name : ' Dispatch PyTorch events'
2
2
3
3
on :
4
+ pull_request :
5
+ branches :
6
+ - ' main'
7
+ paths :
8
+ - ' .github/workflows/dispatch-event.yml'
9
+ - ' .github/actions/list-pr/**'
10
+ - ' !**/*.md'
11
+
4
12
schedule :
5
13
- cron : ' 0 12 * * *'
6
14
Original file line number Diff line number Diff line change 6
6
7
7
jobs :
8
8
redispatch-pr-event :
9
- name : Redispatch PyTorch events
9
+ name : ' Redispatch PyTorch events for #${{ github.event.client_payload.pull_request.number }} '
10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
- name : Checkout
You can’t perform that action at this time.
0 commit comments