Skip to content

Commit

Permalink
feat(conventional attributes): remove revert commit type
Browse files Browse the repository at this point in the history
  • Loading branch information
pedraal committed Aug 20, 2024
1 parent 883a55c commit 4d4de8c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/releam/conventional_attributes.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub type CommitType {
Test
Ci
Chore
Revert
Custom(String)
}

Expand Down Expand Up @@ -222,7 +221,6 @@ pub fn parse_commit_type(commit_type: String) {
"build" -> Build
"ci" -> Ci
"chore" -> Chore
"revert" -> Revert
custom -> Custom(custom)
}
}
5 changes: 1 addition & 4 deletions test/releam/conventional_attributes_test.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import gleeunit/should
import releam/conventional_attributes.{
Build, Chore, Ci, ConventionalAttributes, ConventionalDefinition,
ConventionalOptionalSections, Custom, Docs, Feat, Fix, InvalidCommitDefinition,
InvalidConventionalFooter, Perf, Refactor, Revert, Style, Test,
InvalidConventionalFooter, Perf, Refactor, Style, Test,
}

pub fn main() {
Expand Down Expand Up @@ -269,9 +269,6 @@ pub fn parse_commit_type_test() {
conventional_attributes.parse_commit_type("chore")
|> should.equal(Chore)

conventional_attributes.parse_commit_type("revert")
|> should.equal(Revert)

conventional_attributes.parse_commit_type("whatever")
|> should.equal(Custom("whatever"))
}
3 changes: 1 addition & 2 deletions test/releam/semver_test.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import gleeunit/should
import releam/commit.{Author, Commit}
import releam/conventional_attributes.{
type CommitType, Build, Chore, Ci, ConventionalAttributes, Custom, Docs, Feat,
Fix, Perf, Refactor, Revert, Style, Test,
Fix, Perf, Refactor, Style, Test,
}
import releam/semver.{Bump, Major, Minor, Patch}

Expand Down Expand Up @@ -39,7 +39,6 @@ pub fn commit_to_bump_type_test() {
#(Test, None),
#(Ci, None),
#(Chore, None),
#(Revert, None),
#(Custom("any"), None),
]
|> list.each(fn(combination) {
Expand Down

0 comments on commit 4d4de8c

Please sign in to comment.