MCPcopy Create free account
hub / github.com/ReactiveX/rxjs / validateConventionalTitle

Function validateConventionalTitle

scripts/release/conventional-commit.mjs:4–12  ·  view source on GitHub ↗
(title)

Source from the content-addressed store, hash-verified

2 /^(?<type>feat|fix|perf|revert|docs|chore|refactor|test|build|ci|style)(?:\([^)\r\n]+\))?(?<breaking>!)?: (?<description>\S.*)$/;
3
4export function validateConventionalTitle(title) {
5 const match = conventionalTitle.exec(title);
6 if (!match?.groups) throw new Error('Title is not a supported Conventional Commit.');
7 return {
8 breaking: match.groups.breaking === '!',
9 description: match.groups.description,
10 type: match.groups.type,
11 };
12}

Calls

no outgoing calls

Tested by

no test coverage detected