diff --git a/README.md b/README.md index 3231711..a6cb781 100644 --- a/README.md +++ b/README.md @@ -54,11 +54,11 @@ You can also use format like `type: message` to pre-define commit type, they wil |test|add missing tests|ignore|| |breaking|introduce breaking changes|major|minor| |perf|performance improvements|patch|| -|tweaks|don't know how to describe|ignore|| +|tweaks|don't know how to describe|patch|| **Note**: in 0.y.z versions, major changes will affect `y`, other changes and patches will affect `z`. So in such situation you can never reach `1.0.0` do you? Then just explicitly specific the version for your next release, like: `changelog 1.0.0` -For `tweaks: message`, a message with only `tweaks` or `tweak` will also be ignored. +For `tweaks: subject`, a message with only `tweaks` or `tweak` will also be a patch. You don't have to use these types in your commit message since you can set them one by one when actually running `changelog` (only for CHANGELOG.md, will not update the commit itself). diff --git a/lib/index.js b/lib/index.js index 71c07f6..0c1b4e4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -56,10 +56,12 @@ module.exports = co.wrap(function * ({ const type = semanticType(match[1]) if (type) { commit.subject = commit.subject.replace(re, '') - commit.type = match[1] + commit.type = type } - } else if (isReleaseMessage || isSimpleTweaks) { + } else if (isReleaseMessage) { commit.type = 'ignore' + } else if (isSimpleTweaks) { + commit.type = 'patch' } return commit }).reverse() diff --git a/lib/semantic-type.js b/lib/semantic-type.js index 54d80f8..314d49d 100644 --- a/lib/semantic-type.js +++ b/lib/semantic-type.js @@ -4,8 +4,8 @@ module.exports = function (type) { const types = { docs: 'ignore', doc: 'ignore', - tweaks: 'ignore', - tweak: 'ignore', + tweaks: 'patch', + tweak: 'patch', fix: 'patch', fixes: 'patch', feat: 'minor',