Class GHCompare


  • public class GHCompare
    extends Object
    The model user for comparing 2 commits in the GitHub API.
    Author:
    Michael Clarke
    • Constructor Detail

      • GHCompare

        public GHCompare()
    • Method Detail

      • getUrl

        public URL getUrl()
        Gets url.
        Returns:
        the url
      • getHtmlUrl

        public URL getHtmlUrl()
        Gets html url.
        Returns:
        the html url
      • getPermalinkUrl

        public URL getPermalinkUrl()
        Gets permalink url.
        Returns:
        the permalink url
      • getDiffUrl

        public URL getDiffUrl()
        Gets diff url.
        Returns:
        the diff url
      • getPatchUrl

        public URL getPatchUrl()
        Gets patch url.
        Returns:
        the patch url
      • getStatus

        public GHCompare.Status getStatus()
        Gets status.
        Returns:
        the status
      • getAheadBy

        public int getAheadBy()
        Gets ahead by.
        Returns:
        the ahead by
      • getBehindBy

        public int getBehindBy()
        Gets behind by.
        Returns:
        the behind by
      • getTotalCommits

        public int getTotalCommits()
        Gets total commits.
        Returns:
        the total commits
      • getBaseCommit

        public GHCompare.Commit getBaseCommit()
        Gets base commit.
        Returns:
        the base commit
      • getMergeBaseCommit

        public GHCompare.Commit getMergeBaseCommit()
        Gets merge base commit.
        Returns:
        the merge base commit
      • getFiles

        public GHCommit.File[] getFiles()
        Gets an array of files. By default, the file array is limited to 300 results. To retrieve the full list of files, iterate over each commit returned by listCommits() and use GHCommit.listFiles() to get the files for each commit.
        Returns:
        A copy of the array being stored in the class.