diff --git a/packages/repo-tools/src/lib/openapi/optic/helpers.ts b/packages/repo-tools/src/lib/openapi/optic/helpers.ts index cd2a1637d4..9bcd8c45a3 100644 --- a/packages/repo-tools/src/lib/openapi/optic/helpers.ts +++ b/packages/repo-tools/src/lib/openapi/optic/helpers.ts @@ -131,119 +131,108 @@ export const generateCompareSummaryMarkdown = ( ); const anyCompletedHasCapture = results.completed.some(s => s.capture); return ` - ${ - results.completed.length > 0 - ? `### APIs Changed - -
| API | -Changes | -Rules | - ${anyCompletedHasWarning ? 'Warnings | ' : ''} - ${anyCompletedHasCapture ? 'Tests | ' : ''} -- |
|---|---|---|---|---|---|
| - - ${relative(cliPaths.targetDir, s.apiName)} - - | -- - ${getOperationsText(s.comparison.groupedDiffs, { - webUrl: s.opticWebUrl, - verbose: options.verbose, - labelJoiner: ',\n', - })} - - | -- - ${getChecksLabel(s.comparison.results, results.severity)} - - | - - ${anyCompletedHasWarning ? `${s.warnings.join('\n')} | ` : ''} - - ${ - anyCompletedHasCapture - ? ` - -- - ${ - s.capture - ? s.capture.success - ? s.capture.mismatchedEndpoints || s.capture.unmatchedInteractions - ? getCaptureIssuesLabel({ - unmatchedInteractions: s.capture.unmatchedInteractions, - mismatchedEndpoints: s.capture.mismatchedEndpoints, - }) - : `✅ ${s.capture.percentCovered}% coverage` - : '❌ Failed to run' - : '' - } - - | - - ` - : '' - } -
| API | -Error | -
|---|---|
| ${s.apiName} | -- - ${'```'} - ${s.error} - ${'```'} - - | -
| API | +Changes | +Rules | +${anyCompletedHasWarning ? 'Warnings | ' : ''} +${anyCompletedHasCapture ? 'Tests | ' : ''} +
|---|---|---|---|---|
| +${relative(cliPaths.targetDir, s.apiName)} + | ++${getOperationsText(s.comparison.groupedDiffs, { + webUrl: s.opticWebUrl, + verbose: options.verbose, + labelJoiner: ',\n', +})} + | ++${getChecksLabel(s.comparison.results, results.severity)} + | + +${anyCompletedHasWarning ? `${s.warnings.join('\n')} | ` : ''} + +${ + anyCompletedHasCapture + ? ` ++${ + s.capture + ? s.capture.success + ? s.capture.mismatchedEndpoints || s.capture.unmatchedInteractions + ? getCaptureIssuesLabel({ + unmatchedInteractions: s.capture.unmatchedInteractions, + mismatchedEndpoints: s.capture.mismatchedEndpoints, + }) + : `✅ ${s.capture.percentCovered}% coverage` + : '❌ Failed to run' + : '' +} + | +` + : '' +} +
| API | +Error | +
|---|---|
| ${s.apiName} | ++ +${'```'} +${s.error} +${'```'} + + | +