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

Commit f90cee1

Browse files
committed
better changelog warning format
1 parent 28b5d9b commit f90cee1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1818
## [Unreleased]
1919

2020
### BREAKING CHANGES
21-
- Rename `lib` directories to `utils`
21+
- Rename `lib` directories to `utils` @ecraig12345 ([#2153](https://github.com/microsoft/fluent-ui-react/pull/2153))
2222

2323
### Fixes
2424
- Prevent text highlight on icon consecutive clicks in `Checkbox` @silviuavram ([#2154](https://github.com/microsoft/fluent-ui-react/pull/2154))

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)