Package com.jcabi.github
Interface Pull
-
- All Superinterfaces:
Comparable<Pull>
,JsonPatchable
,JsonReadable
- All Known Implementing Classes:
Pull.Smart
@Immutable public interface Pull extends Comparable<Pull>, JsonReadable, JsonPatchable
Github pull request.- Since:
- 0.3
- Version:
- $Id: 0bce522e781a222bb0e94475612507b784df960b $
- Author:
- Yegor Bugayenko (yegor256@gmail.com)
- See Also:
- Pull Request API
- Suppressed Checkstyle violations:
- MultipleStringLiterals (500 lines)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Pull.Smart
Smart pull request with extra features.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PullRef
base()
Get its base ref.PullComments
comments()
Get Pull Comments.Iterable<Commit>
commits()
Get all commits of the pull request.Iterable<javax.json.JsonObject>
files()
List all files of the pull request.PullRef
head()
Get its head ref.void
merge(String msg)
Merge it.MergeState
merge(String msg, String sha)
Merge it.int
number()
Get its number.Repo
repo()
Repo we're in.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface com.jcabi.github.JsonPatchable
patch
-
Methods inherited from interface com.jcabi.github.JsonReadable
json
-
-
-
-
Method Detail
-
repo
Repo repo()
Repo we're in.- Returns:
- Repo
-
number
int number()
Get its number.- Returns:
- Pull request number
-
base
PullRef base() throws IOException
Get its base ref.- Returns:
- Base ref
- Throws:
IOException
- If there is any I/O problem
-
head
PullRef head() throws IOException
Get its head ref.- Returns:
- Head ref
- Throws:
IOException
- If there is any I/O problem
-
commits
Iterable<Commit> commits() throws IOException
Get all commits of the pull request.- Returns:
- Commits
- Throws:
IOException
- If there is any I/O problem- See Also:
- List Commits on a Pull Request
-
files
Iterable<javax.json.JsonObject> files() throws IOException
List all files of the pull request.- Returns:
- Files
- Throws:
IOException
- If there is any I/O problem- See Also:
- List Pull Request Files
-
merge
void merge(String msg) throws IOException
Merge it.- Parameters:
msg
- Commit message- Throws:
IOException
- If there is any I/O problem- See Also:
- Merge a Pull Request
-
merge
MergeState merge(String msg, String sha) throws IOException
Merge it.- Parameters:
msg
- Commit messagesha
- Optional SHA hash for head comparison- Returns:
- State of the Merge
- Throws:
IOException
- IOException If there is any I/O problem
-
comments
PullComments comments() throws IOException
Get Pull Comments.- Returns:
- Comments.
- Throws:
IOException
- If there is any I/O problem- See Also:
- Link Relations - Review Comments
-
-