Skip to content

Commit 717ba35

Browse files
committed
feat(info): display better info
1 parent a32c769 commit 717ba35

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

action/lib/deduplicate.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ export default async function ({ octokit, workflow_id, run_id, sha }) {
1111
// get current run of this workflow
1212
const { data: { workflow_runs } } = await octokit.request('GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs', {
1313
...github.context.repo,
14+
per_page: 100,
1415
workflow_id
1516
})
1617

17-
core.debug(`found ${workflow_runs.length} runs of workflow ${workflow_id}`)
18+
core.info(`found ${workflow_runs.length} runs of workflow ${workflow_id}`)
1819
core.debug(inspect(workflow_runs.map(run => ({ id: run.id, name: run.name }))))
1920

2021
// filter and sort
@@ -30,7 +31,7 @@ export default async function ({ octokit, workflow_id, run_id, sha }) {
3031
// sort
3132
.sort((a, b) => new Date(b.created_at) - new Date(a.created_at))
3233

33-
core.debug(`found ${cancellable.length} cancellable runs of workflow ${workflow_id}`)
34+
core.info(`found ${cancellable.length} cancellable runs of workflow ${workflow_id}`)
3435

3536
if (cancellable.length === 0) {
3637
return
@@ -41,7 +42,7 @@ export default async function ({ octokit, workflow_id, run_id, sha }) {
4142
// exclude last one (i.e. the first running instance)
4243
const prime = cancellable.pop()
4344

44-
core.debug(`determined ${prime.id} to be the prime run of this workflow`)
45+
core.info(`determined ${prime.id} to be the prime run of this workflow`)
4546
core.debug(inspect(prime))
4647

4748
for (const run of cancellable) {

0 commit comments

Comments
 (0)