diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5f7f347..9a7def7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,12 +43,13 @@ The empty lines between the different parts are required. | **perf** | Performance optimizations | patch | | **refactor** | Changes to the code structure without fixing bugs or adding features | patch | | **chore** | Changes to the project setup and tools, dependency bumps, house-keeping | patch | +| **build** | Changes that affect the build system (e.g webpack, rollup, ...) | patch | | **revert** | reverts a previous commit | patch | - || | **docs** | Changes to the documentation | none | | **style** | Cleanup & lint rule fixes. Note that often it's better to just amend the previous commit if it introduced lint errors | none | | **test** | Fixing existing tests or adding missing ones. Just like with **style**, if you add tests to a feature you just introduced in the previous commit, consider keeping the tests, and the feature in the same commit instead. | none | +| **ci** | Changes to your CI configuration & scripts | none | * ``: A [good git commit message subject](http://chris.beams.io/posts/git-commit/#limit-50). - Keep it brief. If possible the whole first line should have at most 50 characters. - Use an imperative mood. "Create" instead of "creates" or "created". diff --git a/lib/steps/release-info.js b/lib/steps/release-info.js index 01682e5..59619ec 100644 --- a/lib/steps/release-info.js +++ b/lib/steps/release-info.js @@ -97,6 +97,7 @@ function determineReleaseInfo(commits, acceptInvalidCommits) { case 'fix': case 'refactor': case 'perf': + case 'build': case 'revert': releaseType = Math.max(releaseType, 1); break; @@ -108,6 +109,7 @@ function determineReleaseInfo(commits, acceptInvalidCommits) { case 'docs': case 'style': case 'test': + case 'ci': case 'pr': continue; diff --git a/test/fixtures/patch-commits b/test/fixtures/patch-commits index 60d681d..d3400db 100755 --- a/test/fixtures/patch-commits +++ b/test/fixtures/patch-commits @@ -15,3 +15,7 @@ git commit -m "chore: Adding refactor commit" echo "console.log('more');" > perf.js git add perf.js git commit -m "chore: Adding perf commit" + +echo "console.log('more');" > build.js +git add build.js +git commit -m "build: Adding perf commit" diff --git a/test/fixtures/silent-commits b/test/fixtures/silent-commits index 40202b9..a0f52e7 100755 --- a/test/fixtures/silent-commits +++ b/test/fixtures/silent-commits @@ -16,6 +16,10 @@ echo "console.log('more');" > test.js git add test.js git commit -m "test: Adding test commit" +echo "console.log('more');" > ci.js +git add ci.js +git commit -m "ci: Adding ci commit" + echo "console.log('more');" > pr.js git add pr.js git commit -m "pr: Adding pr commit" diff --git a/test/steps/release-info.test.js b/test/steps/release-info.test.js index 31dad2c..1c7ca92 100644 --- a/test/steps/release-info.test.js +++ b/test/steps/release-info.test.js @@ -90,7 +90,7 @@ git rebase -i --root const testcases = [ { - desc: 'with "chore", "fix", "refactor" & "perf" commit type', + desc: 'with "chore", "fix", "refactor", "build" & "perf" commit type', fixture: 'patch-commits', expected: 'patch', }, @@ -100,7 +100,7 @@ git rebase -i --root expected: 'minor', }, { - desc: 'with "docs", "style", "test" & "pr" commit type', + desc: 'with "docs", "style", "test", "ci" & "pr" commit type', fixture: 'silent-commits', expected: 'none', },