Skip to content

Commit f45ef9d

Browse files
committed
Log something on successful changenote validation
Also, slightly improve the log statement of the validation error case.
1 parent f60f4d9 commit f45ef9d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

pr-checks/changenotes.mts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,15 @@ function usage(): number {
4242

4343
function validate(): number {
4444
try {
45-
return isValidAllChangenoteFiles(fs.readdirSync(CHANGENOTES_DIR)) ? 0 : 1;
45+
if (isValidAllChangenoteFiles(fs.readdirSync(CHANGENOTES_DIR))) {
46+
console.log(`All changenote files in '${CHANGENOTES_DIR}' are valid.`);
47+
return 0;
48+
}
4649
} catch (error) {
4750
console.error(
48-
`${CHANGENOTES_DIR}: failed to read file or directory`,
51+
`Failed to read change-notes directory (${CHANGENOTES_DIR})`,
4952
error,
5053
);
51-
return 1;
5254
}
55+
return 1;
5356
}

0 commit comments

Comments
 (0)