MCPcopy Create free account
hub / github.com/conventional-changelog/commitlint / defaultParser

Function defaultParser

@commitlint/parse/src/index.ts:6–16  ·  view source on GitHub ↗
(message, options)

Source from the content-addressed store, hash-verified

4import defaultChangelogOpts from "conventional-changelog-angular";
5
6const defaultParser: Parser = (message, options) => {
7 if (message === undefined || message === null) {
8 throw new TypeError("Expected a raw commit");
9 }
10 const parser = new CommitParser(options);
11 const result = parser.parse(message);
12 result.scope = result.scope ?? null;
13 result.subject = result.subject ?? null;
14 result.type = result.type ?? null;
15 return result;
16};
17
18export async function parse(
19 message: string,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected