Skip to content

Commit

Permalink
Ignore skipped steps in stage duration computation (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
namoscato authored Oct 2, 2022
1 parent ba800ae commit b0fe81e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/__tests__/message.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,13 @@ describe('postMessage', () => {
steps: [
{
name: 'Post to Slack',
completed_at: '2022-09-10T00:00:05.000Z'
completed_at: '2022-09-10T00:00:05.000Z',
conclusion: 'success'
},
{
name: 'Post to Slack (skipped)',
completed_at: '2022-09-10T00:00:06.000Z',
conclusion: 'skipped'
},
{
name: 'Run namoscato/action-slack-deploy-pipeline',
Expand Down
2 changes: 1 addition & 1 deletion src/github/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ export interface CompletedJobStep extends JobStep {
}

export function isCompletedJobStep(step: JobStep): step is CompletedJobStep {
return Boolean(step.completed_at)
return Boolean(step.completed_at) && 'skipped' !== step.conclusion
}

0 comments on commit b0fe81e

Please sign in to comment.