Skip to content

Commit

Permalink
feat(info): better info logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Feb 19, 2021
1 parent 8dd7d76 commit 7c50b6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions action/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export default async function ({ token, delay, timeout }) {
// date to check against
const before = new Date(created_at)

core.info(`searching for workflow runs before ${before}`)

// get previous runs
let waiting_for = await runs({ octokit, run_id, workflow_id, before })

Expand Down
4 changes: 2 additions & 2 deletions action/lib/runs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default async function ({ octokit, workflow_id, run_id, before }) {
// get older runs
.filter(run => new Date(run.created_at) < before)

core.debug(`found ${waiting_for.length} workflow runs`)
core.debug(inspect(waiting_for))
core.info(`found ${waiting_for.length} workflow runs`)
core.debug(inspect(waiting_for.map(run => ({ id: run.id, name: run.name }))))

return waiting_for
}

0 comments on commit 7c50b6e

Please sign in to comment.