Class LogHandler


  • public class LogHandler
    extends Object
    Commit log handler to parse the commit messages of a git repo since the last commit tag.
    • Constructor Detail

      • LogHandler

        public LogHandler​(org.eclipse.jgit.lib.Repository repository)
        Constructor to setup the handler for a given git repo.
        Parameters:
        repository - The git repository.
    • Method Detail

      • getCommitsSinceLastTag

        public Iterable<org.eclipse.jgit.revwalk.RevCommit> getCommitsSinceLastTag()
                                                                            throws IOException,
                                                                                   org.eclipse.jgit.api.errors.GitAPIException
        Returns the list of commits since the last tag. These will be parsed and based on their commit types will the next release version be determined.
        Returns:
        The interested commit list.
        Throws:
        IOException - thrown in case of any IO issues.
        org.eclipse.jgit.api.errors.GitAPIException - thrown in case os git-related errors.