Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit f27da6e

Browse files
committed
better changelog warning format
1 parent aeef430 commit f27da6e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

build/dangerjs/checkChangelog.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const hasAddedLinesAfterVersionInChangelog = async (danger): Promise<boolean> =>
2020
}
2121

2222
const getMalformedChangelogEntries = async (danger): Promise<string[]> => {
23-
// +- description @githubname ([#DDDD](https://github.com/stardust-ui/react/pull/DDDD))
24-
const validEntry = /^\+- .*@\S+ \(\[#(\d+)]\(https:\/\/github\.com\/(?:stardust-ui\/react|microsoft\/fluent-ui-react)\/pull\/\1\)\)$/
23+
// +- description @githubname ([#DDDD](https://github.com/microsoft/fluent-ui-react/pull/DDDD))
24+
const validEntry = /^\+- .*@\S+ \(\[#(\d+)]\(https:\/\/github\.com\/microsoft\/fluent-ui-react\/pull\/\1\)\)$/
2525

2626
const addedLines = await getAddedLinesFromChangelog(danger)
2727

@@ -50,7 +50,9 @@ export default async ({ danger, fail, warn }: DangerJS) => {
5050
} else {
5151
const malformedChangelogEntries = await getMalformedChangelogEntries(danger)
5252
malformedChangelogEntries.forEach(entry => {
53-
fail(`Invalid entry format in ${CHANGELOG_FILE}: >${entry}<`)
53+
fail(`Invalid entry format in ${CHANGELOG_FILE}: >${entry}<
54+
55+
The correct format is: \`- description @githubname ([#DDDD](https://github.com/microsoft/fluent-ui-react/pull/DDDD)\``)
5456
})
5557

5658
const hasLine = await hasAddedLinesAfterVersionInChangelog(danger)

0 commit comments

Comments
 (0)