Skip to content

Commit 1abea80

Browse files
committed
update
1 parent 47e1b51 commit 1abea80

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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",

.github/workflows/ascend_npu_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ jobs:
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

.github/workflows/dispatch-event.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: 'Dispatch PyTorch events'
22

33
on:
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

0 commit comments

Comments
 (0)