diff --git a/src/main.ts b/src/main.ts index 863b55a..025ca13 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,5 @@ import * as core from "@actions/core"; -import * as ccp from "conventional-commits-parser"; +import { CommitParser } from "conventional-commits-parser"; import type { Commit } from "conventional-commits-parser"; import { execSync } from "child_process"; @@ -30,8 +30,10 @@ export interface CoreService { } export class ConventionalCommitAnalyzer { + private commitParser = new CommitParser(); + analyzeCommit(message: string): Commit { - return ccp.sync(message); + return this.commitParser.parse(message); } determineIncrementType(analyzedCommit: Commit): IncrementType {