Skip to content

Commit 8dd7d76

Browse files
committed
fix(debug): include debugging
1 parent 5aebf82 commit 8dd7d76

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

action/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// packages
1+
// node modules
22
import { inspect } from 'util'
33

4+
// packages
45
import core from '@actions/core'
56
import github from '@actions/github'
67

action/lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import core from '@actions/core'
55
import github from '@actions/github'
66

7+
// modules
78
import runs from './runs.js'
89

910
// sleep function
@@ -31,7 +32,7 @@ export default async function ({ token, delay, timeout }) {
3132
let waiting_for = await runs({ octokit, run_id, workflow_id, before })
3233

3334
if (waiting_for.length === 0) {
34-
core.info('there is no queue!')
35+
core.info('no active run of this workflow found')
3536
process.exit(0)
3637
}
3738

action/lib/workflow-runs.js renamed to action/lib/runs.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
/* eslint-disable camelcase */
22

3+
// node modules
4+
import { inspect } from 'util'
5+
6+
// packages
7+
import core from '@actions/core'
38
import github from '@actions/github'
49

510
export default async function ({ octokit, workflow_id, run_id, before }) {
@@ -18,5 +23,8 @@ export default async function ({ octokit, workflow_id, run_id, before }) {
1823
// get older runs
1924
.filter(run => new Date(run.created_at) < before)
2025

26+
core.debug(`found ${waiting_for.length} workflow runs`)
27+
core.debug(inspect(waiting_for))
28+
2129
return waiting_for
2230
}

0 commit comments

Comments
 (0)