(run: RunProgress)
| 69 | } |
| 70 | |
| 71 | function buildMessage(run: RunProgress): string { |
| 72 | const statusText = |
| 73 | run.status === 'completed' |
| 74 | ? 'completed successfully' |
| 75 | : run.status === 'failed' |
| 76 | ? 'failed' |
| 77 | : 'was stopped' |
| 78 | const errorSuffix = |
| 79 | run.status === 'failed' && run.error ? `: ${run.error}` : '' |
| 80 | const summary = `Workflow "${run.workflowName}" ${statusText}${errorSuffix}` |
| 81 | |
| 82 | return `<${TASK_NOTIFICATION_TAG}> |
| 83 | <${TASK_ID_TAG}>${run.runId}</${TASK_ID_TAG}> |
| 84 | <${TASK_TYPE_TAG}>${WORKFLOW_TASK_TYPE}</${TASK_TYPE_TAG}> |
| 85 | <${STATUS_TAG}>${run.status}</${STATUS_TAG}> |
| 86 | <${SUMMARY_TAG}>${summary}</${SUMMARY_TAG}> |
| 87 | </${TASK_NOTIFICATION_TAG}>` |
| 88 | } |
no outgoing calls
no test coverage detected