mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-01 22:14:52 +00:00
test: add & configure Jest
Fixes #153 Signed-off-by: Ardalan Amini <[email protected]>
This commit is contained in:
11 files changed
+2600
-24
No files matched your search
@@ -23,7 +23,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const REGEX = /^(?<type>[^!:()]*)(?:\((?<scope>[^!()]*?)\)|)(?<breaking>!?): *(?<description>.+?) *(?:\(#(?<pr>[1-9]\d*?)\)|) *(?:\[(?<flag>[^[\]]*?)]|)\s*$/;
|
||||
const REGEX = /^(?<type>[^!:() ]*)(?:\((?<scope>[^!()]*?)\)|)(?<breaking>!?): *(?<description>.+?) *(?:\(#(?<pr>[1-9]\d*?)\)|) *(?:\[(?<flag>[^[\]]*?)]|)\s*$/;
|
||||
|
||||
export function parseCommitMessage(message: string): ParsedCommitMessageI {
|
||||
const { description, flag, pr, scope, type, breaking } = REGEX.exec(message)?.groups ?? {};
|
||||
|
||||
Reference in new issue
Block a user