Skip to content

Commit 19c71e3

Browse files
committed
Adjust formatting
1 parent 67a0fcc commit 19c71e3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/check_changeset.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,17 @@ async function main() {
9090
await exec('yarn changeset status');
9191
} catch (e) {
9292
const messageLines = e.message.replace(/🦋 error /g, '').split('\n');
93-
formattedStatusError = 'Changeset formatting error in following file:%0A';
93+
formattedStatusError = '- Changeset formatting error in following file:%0A';
94+
formattedStatusError += ' ```%0A';
9495
formattedStatusError += messageLines
9596
.filter(
9697
(line: string) => !line.match(/^ at [\w\.]+ \(.+:[0-9]+:[0-9]+\)/)
9798
)
9899
.filter((line: string) => !line.includes('Command failed'))
99100
.filter((line: string) => !line.includes('exited with error code 1'))
101+
.map((line: string) => ` ${line}`)
100102
.join('%0A');
103+
formattedStatusError += ' ```%0A';
101104
/**
102105
* Sets Github Actions output for a step. Pass changeset error message to next
103106
* step. See:
@@ -117,13 +120,13 @@ async function main() {
117120
);
118121
if (missingPackages.length > 0) {
119122
const missingPackagesLines = [
120-
'Warning: This PR modifies files in the following packages but they have not been included in the changeset file:'
123+
'- Warning: This PR modifies files in the following packages but they have not been included in the changeset file:'
121124
];
122125
for (const missingPackage of missingPackages) {
123-
missingPackagesLines.push(`- ${missingPackage}`);
126+
missingPackagesLines.push(` - ${missingPackage}`);
124127
}
125128
missingPackagesLines.push('');
126-
missingPackagesLines.push('Make sure this was intentional.');
129+
missingPackagesLines.push(' Make sure this was intentional.');
127130
missingPackagesError = missingPackagesLines.join('%0A');
128131
}
129132
}

0 commit comments

Comments
 (0)