Skip to content

Commit 0ccb779

Browse files
add complete word and abbreviation commit type options
1 parent e350d66 commit 0ccb779

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

cmd/semantic-release/semantic-release.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,19 @@ func printCommitTypes() {
174174
fmt.Println(colorYellow + "\n\t* [build]" + colorReset + ": Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)")
175175
fmt.Println(colorYellow + "\t* [ci]" + colorReset + ": Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)")
176176
fmt.Println(colorYellow + "\t* [docs]" + colorReset + ": Documentation only changes")
177+
fmt.Println(colorYellow + "\t* [documentation]" + colorReset + ": ||")
177178
fmt.Println(colorYellow + "\t* [feat]" + colorReset + ": A new feature")
179+
fmt.Println(colorYellow + "\t* [feature]" + colorReset + ": ||")
178180
fmt.Println(colorYellow + "\t* [fix]" + colorReset + ": A bug fix")
179181
fmt.Println(colorYellow + "\t* [perf]" + colorReset + ": A code change that improves performance")
182+
fmt.Println(colorYellow + "\t* [performance]" + colorReset + ": ||")
180183
fmt.Println(colorYellow + "\t* [refactor]" + colorReset + ": A code change that neither fixes a bug nor adds a feature")
181184
fmt.Println(colorYellow + "\t* [style]" + colorReset + ": Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)")
182185
fmt.Println(colorYellow + "\t* [test]" + colorReset + ": Adding missing tests or correcting existing tests")
183186
fmt.Println(colorYellow + "\t* [skip]" + colorReset + ": Skip versioning")
184-
fmt.Println(colorYellow + "\t* [skip versioning]" + colorReset + ": Skip versioning")
185-
fmt.Println(colorYellow + "\t* [breaking change]" + colorReset + ": Change that will require other changes in dependant applications")
186-
fmt.Println(colorYellow + "\t* [breaking changes]" + colorReset + ": Changes that will require other changes in dependant applications")
187+
fmt.Println(colorYellow + "\t* [bc]" + colorReset + ": Changes that will require other changes in dependant applications")
188+
fmt.Println(colorYellow + "\t* [breaking]" + colorReset + ": ||")
189+
fmt.Println(colorYellow + "\t* [breaking change]" + colorReset + ": ||")
187190
}
188191

189192
func printCommitMessageExample() {

src/commit-type/commit_type.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ type CommitType struct {
1515
}
1616

1717
func (c *CommitType) GetAll() []string {
18-
return []string{"build", "ci", "docs", "fix", "feat", "perf", "refactor", "style", "test", "breaking change", "breaking changes", "skip"}
18+
return []string{"build", "ci", "docs", "fix", "feat", "feature", "feature", "perf", "performance", "refactor", "style", "test", "bc", "breaking", "breaking change", "skip"}
1919
}
2020

2121
func (c *CommitType) GetMajorUpgrade() []string {
22-
return []string{"breaking change", "breaking changes"}
22+
return []string{"bc", "breaking", "breaking change"}
2323
}
2424

2525
func (c *CommitType) GetMinorUpgrade() []string {
26-
return []string{"feat"}
26+
return []string{"feat", "feature"}
2727
}
2828

2929
func (c *CommitType) GetPatchUpgrade() []string {
30-
return []string{"build", "ci", "docs", "fix", "perf", "refactor", "style", "test"}
30+
return []string{"build", "ci", "docs", "documentation", "fix", "perf", "performance", "refactor", "style", "test"}
3131
}
3232

3333
func (c *CommitType) GetSkipVersioning() []string {

src/commit-type/commit_type_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,31 @@ func setup(t *testing.T) *fixture {
2727

2828
func TestGetAll(t *testing.T) {
2929
f := setup(t)
30-
expected := []string{"build", "ci", "docs", "fix", "feat", "perf", "refactor", "style", "test", "breaking change", "breaking changes", "skip"}
30+
expected := []string{"build", "ci", "docs", "fix", "feat", "feature", "feature", "perf", "performance", "refactor", "style", "test", "bc", "breaking", "breaking change", "skip"}
3131
actual := f.commitType.GetAll()
3232

3333
tests.AssertDeepEqualValues(t, expected, actual)
3434
}
3535

3636
func TestGetMajorUpgrade(t *testing.T) {
3737
f := setup(t)
38-
expected := []string{"breaking change", "breaking changes"}
38+
expected := []string{"bc", "breaking", "breaking change"}
3939
actual := f.commitType.GetMajorUpgrade()
4040

4141
tests.AssertDeepEqualValues(t, expected, actual)
4242
}
4343

4444
func TestGetMinorUpgrade(t *testing.T) {
4545
f := setup(t)
46-
expected := []string{"feat"}
46+
expected := []string{"feat", "feature"}
4747
actual := f.commitType.GetMinorUpgrade()
4848

4949
tests.AssertDeepEqualValues(t, expected, actual)
5050
}
5151

5252
func TestGetPatchUpgrade(t *testing.T) {
5353
f := setup(t)
54-
expected := []string{"build", "ci", "docs", "fix", "perf", "refactor", "style", "test"}
54+
expected := []string{"build", "ci", "docs", "documentation", "fix", "perf", "performance", "refactor", "style", "test"}
5555
actual := f.commitType.GetPatchUpgrade()
5656

5757
tests.AssertDeepEqualValues(t, expected, actual)

0 commit comments

Comments
 (0)