Skip to content

Commit 6cf18b9

Browse files
authored
fix: include "safe based on usage" within github checkrun summary (#6862)
1 parent 05a723d commit 6cf18b9

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.changeset/tender-rings-explode.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hive': patch
3+
---
4+
5+
Show whether a breaking change is safe based on usage within the GitHub check-run summary.

packages/services/api/src/modules/schema/providers/schema-publisher.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,8 +2452,17 @@ export class SchemaPublisher {
24522452
}
24532453
}
24542454

2455-
private errorsToMarkdown(errors: ReadonlyArray<{ message: string }>): string {
2456-
return ['', ...errors.map(error => `- ${bolderize(error.message)}`)].join('\n');
2455+
private errorsToMarkdown(
2456+
errors: ReadonlyArray<{ message: string; isSafeBasedOnUsage?: boolean }>,
2457+
): string {
2458+
return [
2459+
'',
2460+
...errors.map(
2461+
error =>
2462+
`- ${bolderize(error.message)}` +
2463+
(error.isSafeBasedOnUsage ? ' (safe based on usage)' : ''),
2464+
),
2465+
].join('\n');
24572466
}
24582467

24592468
private warningsToMarkdown(warnings: SchemaCheckWarning[]): string {

0 commit comments

Comments
 (0)