Record Class RepositoryState
java.lang.Object
java.lang.Record
io.github.joke.conventionalversion.calc.RepositoryState
- Record Components:
recordedRelease- the version release-please last recorded, ornullwhen the project has never releasedheadIsReleaseCommit- whether HEAD is the commit thatrecordedReleasewas released at; only evertruewhenrecordedReleaseis presentcommitMessages- raw messages of the commits in range, oldest first, so that "the most recent wins" is the last match rather than the firstheadSha- the commit the build was produced from
public record RepositoryState(@Nullable SemanticVersion recordedRelease, boolean headIsReleaseCommit, List<String> commitMessages, String headSha)
extends Record
The repository facts the calculation needs, already gathered.
-
Constructor Summary
ConstructorsConstructorDescriptionRepositoryState(@Nullable SemanticVersion recordedRelease, boolean headIsReleaseCommit, List<String> commitMessages, String headSha) Creates an instance of aRepositoryStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecommitMessagesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theheadIsReleaseCommitrecord component.headSha()Returns the value of theheadSharecord component.@Nullable SemanticVersionReturns the value of therecordedReleaserecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RepositoryState
public RepositoryState(@Nullable SemanticVersion recordedRelease, boolean headIsReleaseCommit, List<String> commitMessages, String headSha) Creates an instance of aRepositoryStaterecord class.- Parameters:
recordedRelease- the value for therecordedReleaserecord componentheadIsReleaseCommit- the value for theheadIsReleaseCommitrecord componentcommitMessages- the value for thecommitMessagesrecord componentheadSha- the value for theheadSharecord component
-
-
Method Details
-
findRecordedRelease
-
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. -
recordedRelease
Returns the value of therecordedReleaserecord component.- Returns:
- the value of the
recordedReleaserecord component
-
headIsReleaseCommit
public boolean headIsReleaseCommit()Returns the value of theheadIsReleaseCommitrecord component.- Returns:
- the value of the
headIsReleaseCommitrecord component
-
commitMessages
Returns the value of thecommitMessagesrecord component.- Returns:
- the value of the
commitMessagesrecord component
-
headSha
-