Skip to content

Commit 2432383

Browse files
committed
update
1 parent 8888a04 commit 2432383

File tree

2 files changed

+22
-30
lines changed

2 files changed

+22
-30
lines changed

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

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,19 @@ runs:
3535
result-encoding: string
3636
script: |
3737
const resp = await github.rest.pulls.list({
38-
owner: '${{ inputs.owner }}',
39-
repo: '${{ inputs.repository }}',
38+
owner: inputs.owner,
39+
repo: inputs.repository,
4040
state: 'open',
4141
sort: 'created',
4242
per_page: 100
43-
}).catch(
44-
e => {
45-
core.setFailed(e.message)
46-
}
47-
);
43+
});
4844
49-
const timeRange = parseInt(${{ inputs.hours }}) * 60 * 60 * 1000;
45+
const timeRange = parseInt(inputs.hours) * 60 * 60 * 1000;
5046
const sinceTime = new Date(Date.now() - timeRange).toISOString();
51-
const input_labels = ${{ inputs.labels }};
47+
const input_labels = inputs.labels;
5248
const labels = input_labels
53-
? input_labels.split(',|\n').map(label => label.trim())
54-
: [];
49+
? input_labels.split(/,|\n/).map(label => label.trim())
50+
: [];
5551
5652
const prs = resp.data.filter(pr => {
5753
const hasLabel = labels.length === 0
@@ -66,20 +62,18 @@ runs:
6662
const pr_urls = prs.map(pr => pr.html_url);
6763
core.info(`prs: ${pr_urls.join(",\n")}`);
6864
69-
return prs.map(pr => {
70-
return {
71-
number: pr.number,
72-
title: pr.title,
73-
body: pr.body,
74-
state: pr.state,
75-
draft: pr.draft,
76-
created_at: pr.created_at,
77-
updated_at: pr.updated_at,
78-
closed_at: pr.closed_at,
79-
merged_at: pr.merged_at,
80-
html_url: pr.html_url,
81-
base: pr.base.ref,
82-
head: pr.head.ref,
83-
labels: pr.labels.map(label => label.name)
84-
};
85-
});
65+
return prs.map(pr => ({
66+
number: pr.number,
67+
title: pr.title,
68+
body: pr.body,
69+
state: pr.state,
70+
draft: pr.draft,
71+
created_at: pr.created_at,
72+
updated_at: pr.updated_at,
73+
closed_at: pr.closed_at,
74+
merged_at: pr.merged_at,
75+
html_url: pr.html_url,
76+
base: pr.base.ref,
77+
head: pr.head.ref,
78+
labels: pr.labels.map(label => label.name)
79+
}));

.github/workflows/ascend_npu_test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
- '.github/workflows/_ascend_npu_build_torch_npu.yml'
1111
- '.github/workflows/_ascend_npu_ut.yml'
1212
- '.github/workflows/_ascend_npu_benchmark.yml'
13-
- '.github/actions/**'
1413
- '.ci/**'
1514
- 'ascend_npu/**'
1615
- 'src/**'
@@ -24,7 +23,6 @@ on:
2423
- '.github/workflows/_ascend_npu_build_torch_npu.yml'
2524
- '.github/workflows/_ascend_npu_ut.yml'
2625
- '.github/workflows/_ascend_npu_benchmark.yml'
27-
- '.github/actions/**'
2826
- '.ci/**'
2927
- 'ascend_npu/**'
3028
- 'src/**'

0 commit comments

Comments
 (0)