Class RepositoryStateReader

java.lang.Object
io.github.joke.conventionalversion.git.RepositoryStateReader

public class RepositoryStateReader extends Object
Gathers everything the calculation needs from a checkout.

The changelog says which version was last released, the tag says where. Tags alone are not enough: release-please's notion of "released" is a GitHub Release it created, so a tag made by hand is invisible to it and reading the highest tag would disagree with release-please exactly when someone has tagged manually.

  • Constructor Details

  • Method Details

    • read

      public RepositoryState read(String tagPrefix)
    • findRecordedRelease

      @VisibleForTesting protected Optional<SemanticVersion> findRecordedRelease()
    • readChangelog

      @VisibleForTesting protected String readChangelog()
      An absent changelog is the "never released" case, not an error.
    • stateAtRelease

      @VisibleForTesting protected RepositoryState stateAtRelease(SemanticVersion recorded, String tagPrefix, String headSha)
    • stateWithoutRelease

      @VisibleForTesting protected RepositoryState stateWithoutRelease(String headSha)
    • allCommitMessages

      @VisibleForTesting protected List<String> allCommitMessages()
      An empty repository has no HEAD to log, which is still the "never released" case.