Skip to content

Commit

Permalink
chore: re-apply the changes to filter commits
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Mar 4, 2023
1 parent 09f30cc commit 2e11919
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/commands/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
parseCommits,
bumpVersion,
generateMarkDown,
filterCommits,
} from "..";
import { githubRelease } from "./github";

Expand All @@ -35,6 +36,7 @@ export default async function defaultMain(args: Argv) {
config.types[c.type] &&
!(c.type === "chore" && c.scope === "deps" && !c.isBreaking)
);
const filteredCommits = filterCommits(commits, config);

// Bump version optionally
if (args.bump || args.release) {
Expand All @@ -46,7 +48,7 @@ export default async function defaultMain(args: Argv) {
} else if (args.patch) {
type = "patch";
}
const newVersion = await bumpVersion(commits, config, { type });
const newVersion = await bumpVersion(filteredCommits, config, { type });
if (!newVersion) {
consola.error("Unable to bump version based on changes.");
process.exit(1);
Expand All @@ -55,7 +57,7 @@ export default async function defaultMain(args: Argv) {
}

// Generate markdown
const markdown = await generateMarkDown(commits, config);
const markdown = await generateMarkDown(filteredCommits, config);

// Show changelog in CLI unless bumping or releasing
const displayOnly = !args.bump && !args.release;
Expand Down

0 comments on commit 2e11919

Please sign in to comment.