Skip to content

Commit

Permalink
fix(conventional-commits): skip release when no increment detected
Browse files Browse the repository at this point in the history
This change treats the falsy value from conventional commits as
no increment detected, in which case we tell auto to skip it for
release consideration.
  • Loading branch information
krohrsb committed Mar 27, 2020
1 parent 02bcb22 commit 7597c8d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/conventional-commits/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ export default class ConventionalCommitsPlugin implements IPlugin {
mappers.increment,
parse(commit.subject)
);
const incrementLabel = auto.semVerLabels.get(
conventionalCommit.increment as VersionLabel
);
// conventional commits will return a falsy value when no incrememnt is detected (e.g., chore/perf/refactor commits)
const commitIncrement =
(conventionalCommit.increment as VersionLabel) || "skip";
const incrementLabel = auto.semVerLabels.get(commitIncrement);
const allSemVerLabels = [
auto.semVerLabels.get(SEMVER.major),
auto.semVerLabels.get(SEMVER.minor),
Expand Down

0 comments on commit 7597c8d

Please sign in to comment.