Record Class ConventionalCommit
java.lang.Object
java.lang.Record
io.github.joke.conventionalversion.calc.ConventionalCommit
- Record Components:
type- the commit type, ornullwhen the header does not conformscope- the optional scope; captured but not yet used to derive per-module versionsbreaking- whether the commit declares a breaking changereleaseAs- the version named by aRelease-As:footer, ornull
public record ConventionalCommit(@Nullable String type, @Nullable String scope, boolean breaking, @Nullable SemanticVersion releaseAs)
extends Record
A single commit reduced to the facts that affect the version.
A message that does not conform to the Conventional Commits specification is represented with a
null type rather than by an exception, because a repository is free to contain any commit
message and an unparseable one simply contributes nothing.
-
Constructor Summary
ConstructorsConstructorDescriptionConventionalCommit(@Nullable String type, @Nullable String scope, boolean breaking, @Nullable SemanticVersion releaseAs) Creates an instance of aConventionalCommitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbreaking()Returns the value of thebreakingrecord component.final booleanIndicates whether some other object is "equal to" this one.findType()final inthashCode()Returns a hash code value for this object.static ConventionalCommitA message that conforms to nothing and names no version.@Nullable SemanticVersionReturns the value of thereleaseAsrecord component.@Nullable Stringscope()Returns the value of thescoperecord component.final StringtoString()Returns a string representation of this record class.@Nullable Stringtype()Returns the value of thetyperecord component.
-
Constructor Details
-
ConventionalCommit
public ConventionalCommit(@Nullable String type, @Nullable String scope, boolean breaking, @Nullable SemanticVersion releaseAs) Creates an instance of aConventionalCommitrecord class.
-
-
Method Details
-
nonConforming
A message that conforms to nothing and names no version. -
findType
-
findReleaseAs
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
type
-
scope
-
breaking
-
releaseAs
-