File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 68
68
if (prs.length > 0) {
69
69
const pr_urls = prs.map(pr => pr.html_url);
70
70
core.info(`prs: ${pr_urls.join("\n")}`);
71
+ } else {
72
+ core.warning("No pull requests found!");
71
73
}
72
74
73
75
const result = prs.map(pr => ({
Original file line number Diff line number Diff line change 4
4
schedule :
5
5
- cron : ' 0 12 * * *'
6
6
7
+ pull_request :
8
+ branches :
9
+ - ' main'
10
+ paths :
11
+ - ' .github/workflows/dispatch-event.yml'
12
+ - ' .github/workflows/redispatch-event.yml'
13
+ - ' .github/actions/list-pr/**'
14
+ - ' !**/*.md'
15
+
7
16
workflow_dispatch :
8
17
inputs :
9
18
labels :
10
19
required : false
11
20
type : string
12
- default : ' '
21
+ default : ' module: PrivateUse1 '
13
22
description : ' The labels on pull requests'
14
23
hours :
15
24
required : false
16
25
type : number
17
26
default : 24
18
27
description : ' Pull requests created within this many hours will be listed'
28
+ limit :
29
+ required : false
30
+ type : number
31
+ default : -1
32
+ description : ' How many pull requests will be listed'
19
33
20
34
concurrency :
21
35
group : ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
@@ -39,10 +53,11 @@ jobs:
39
53
token : ${{ secrets.COSDT_BOT_TOKEN }}
40
54
owner : pytorch
41
55
repository : pytorch
42
- labels : ${{ github.event.inputs.labels || '' }}
56
+ labels : " ${{ github.event.inputs.labels || 'module: PrivateUse1 ' }}"
43
57
hours : ${{ github.event.inputs.hours || '24' }}
44
58
45
59
dispatch-pr :
60
+ if : ${{ needs.list-pr.outputs.prs != '[]' }}
46
61
name : ' Dispatch PR event - #${{ matrix.data.pull_request.number }}'
47
62
runs-on : ubuntu-latest
48
63
needs :
You can’t perform that action at this time.
0 commit comments