Package org.kohsuke.github
Class GHCompare
- java.lang.Object
-
- org.kohsuke.github.GHCompare
-
public class GHCompare extends Object
The model user for comparing 2 commits in the GitHub API.- Author:
- Michael Clarke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GHCompare.Commit
Compare commits had a child commit element with additional details we want to capture.static class
GHCompare.InnerCommit
The type InnerCommit.static class
GHCompare.Status
The enum Status.static class
GHCompare.Tree
The type Tree.static class
GHCompare.User
Deprecated.useGitUser
instead.
-
Field Summary
Fields Modifier and Type Field Description GHCompare.Status
status
-
Constructor Summary
Constructors Constructor Description GHCompare()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAheadBy()
Gets ahead by.GHCompare.Commit
getBaseCommit()
Gets base commit.int
getBehindBy()
Gets behind by.GHCompare.Commit[]
getCommits()
Gets an array of commits.URL
getDiffUrl()
Gets diff url.GHCommit.File[]
getFiles()
Gets an array of commits.URL
getHtmlUrl()
Gets html url.GHCompare.Commit
getMergeBaseCommit()
Gets merge base commit.URL
getPatchUrl()
Gets patch url.URL
getPermalinkUrl()
Gets permalink url.GHCompare.Status
getStatus()
Gets status.int
getTotalCommits()
Gets total commits.URL
getUrl()
Gets url.GHCompare
wrap(GHRepository owner)
Wrap gh compare.
-
-
-
Field Detail
-
status
public GHCompare.Status status
-
-
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
-
getCommits
public GHCompare.Commit[] getCommits()
Gets an array of commits.- Returns:
- A copy of the array being stored in the class.
-
getFiles
public GHCommit.File[] getFiles()
Gets an array of commits.- Returns:
- A copy of the array being stored in the class.
-
wrap
public GHCompare wrap(GHRepository owner)
Wrap gh compare.- Parameters:
owner
- the owner- Returns:
- the gh compare
-
-