Skip to content

Commit

Permalink
chore: removing console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
tmlmt committed Oct 22, 2023
1 parent dfbb895 commit b013138
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,20 @@ export function filterParsedCommits(
): GitCommit[] {
// parsing the exclude parameter ('chore(deps)' => ['chore(deps)','chore','(deps)','deps'])
const excludes: RegExpMatchArray[] = config.exclude
? config.exclude.map((excludeString) =>
excludeString.match(/(\*|[a-z]+)(\((.+)\))?/)
)
: [];
console.log(excludes)
return commits.filter((c) =>
config.types[c.type] && !excludes.some((e) =>
e &&
(e[1] === "*" || c.type === e[1]) &&
(c.scope === e[3] || !e[3]) &&
!c.isBreaking)
? config.exclude.map((excludeString) =>
excludeString.match(/(\*|[a-z]+)(\((.+)\))?/)
)
: [];
return commits.filter(
(c) =>
config.types[c.type] &&
!excludes.some(
(e) =>
e &&
(e[1] === "*" || c.type === e[1]) &&
(c.scope === e[3] || !e[3]) &&
!c.isBreaking
)
);
}

Expand Down

0 comments on commit b013138

Please sign in to comment.