Package com.jcabi.github
Class Pull.Smart
java.lang.Object
com.jcabi.github.Pull.Smart
- All Implemented Interfaces:
JsonPatchable,JsonReadable,Pull,Comparable<Pull>
- Enclosing interface:
- Pull
Smart pull request with extra features.
- Since:
- 0.3
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jcabi.github.Pull
Pull.Smart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthor()Get its author.base()Get its base ref.body()Get its body.voidChange its body.checks()Get Pull Checks.closedAt()When this pull request was closed.comments()Get Pull Comments.intGet comments count.commits()Get all commits of the pull request.intWhen this pull request was created.Iterable<jakarta.json.JsonObject>files()List all files of the pull request.head()Get its head ref.htmlUrl()Get its HTML URL.booleanisOpen()Is it open?issue()Get an issue where the pull request is submitted.jakarta.json.JsonObjectjson()Describe it in a JSON object.voidMerge it.Merge it.mergedAt()When this pull request was merged.intnumber()Get its number.voidpatch(jakarta.json.JsonObject json) Patch using this JSON object.repo()Repo we're in.state()Get its state.voidChange its state.title()Get its title.voidChange its title.When this pull request was updated.url()Get its URL.
-
Constructor Details
-
Smart
Public ctor.- Parameters:
pll- Pull request
-
-
Method Details
-
isOpen
Is it open?- Returns:
- TRUE if it's open
- Throws:
IOException- If there is any I/O problem
-
state
Get its state.- Returns:
- State of pull request
- Throws:
IOException- If there is any I/O problem
-
state
Change its state.- Parameters:
state- State of pull request- Throws:
IOException- If there is any I/O problem
-
title
Get its title.- Returns:
- Title of pull request
- Throws:
IOException- If there is any I/O problem
-
title
Change its title.- Parameters:
text- Title of pull request- Throws:
IOException- If there is any I/O problem
-
body
Get its body.- Returns:
- Body of pull request
- Throws:
IOException- If there is any I/O problem
-
body
Change its body.- Parameters:
text- Body of pull request- Throws:
IOException- If there is any I/O problem
-
url
Get its URL.- Returns:
- URL of pull request
- Throws:
IOException- If there is any I/O problem
-
htmlUrl
Get its HTML URL.- Returns:
- URL of pull request
- Throws:
IOException- If there is any I/O problem
-
createdAt
When this pull request was created.- Returns:
- Date of creation
- Throws:
IOException- If there is any I/O problem
-
updatedAt
When this pull request was updated.- Returns:
- Date of update
- Throws:
IOException- If there is any I/O problem
-
closedAt
When this pull request was closed.- Returns:
- Date of closing
- Throws:
IOException- If there is any I/O problem
-
mergedAt
When this pull request was merged.- Returns:
- Date of merging
- Throws:
IOException- If there is any I/O problem
-
author
Get its author.- Returns:
- Author of pull request (who submitted it)
- Throws:
IOException- If there is any I/O problem
-
issue
Get an issue where the pull request is submitted.- Returns:
- Issue
-
commentsCount
Get comments count.- Returns:
- Count of comments
- Throws:
IOException- If there is any I/O problem- Since:
- 0.8
-
repo
Description copied from interface:PullRepo we're in. -
number
public int number()Description copied from interface:PullGet its number. -
commits
Description copied from interface:PullGet all commits of the pull request.- Specified by:
commitsin interfacePull- Returns:
- Commits
- Throws:
IOException- If there is any I/O problem- See Also:
-
files
Description copied from interface:PullList all files of the pull request.- Specified by:
filesin interfacePull- Returns:
- Files
- Throws:
IOException- If there is any I/O problem- See Also:
-
merge
Description copied from interface:PullMerge it.- Specified by:
mergein interfacePull- Parameters:
msg- Commit message- Throws:
IOException- If there is any I/O problem- See Also:
-
merge
Description copied from interface:PullMerge it.- Specified by:
mergein interfacePull- 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
Description copied from interface:PullGet Pull Comments.- Specified by:
commentsin interfacePull- Returns:
- Comments.
- Throws:
IOException- If there is any I/O problem- See Also:
-
checks
Description copied from interface:PullGet Pull Checks.- Specified by:
checksin interfacePull- Returns:
- Checks.
- Throws:
IOException- If there is any I/O problem.- See Also:
-
json
Description copied from interface:JsonReadableDescribe it in a JSON object.- Specified by:
jsonin interfaceJsonReadable- Returns:
- JSON object
- Throws:
IOException- If there is any I/O problem
-
patch
Description copied from interface:JsonPatchablePatch using this JSON object.- Specified by:
patchin interfaceJsonPatchable- Parameters:
json- JSON object- Throws:
IOException- If there is any I/O problem
-
compareTo
- Specified by:
compareToin interfaceComparable<Pull>
-
base
Description copied from interface:PullGet its base ref.- Specified by:
basein interfacePull- Returns:
- Base ref
- Throws:
IOException- If there is any I/O problem
-
head
Description copied from interface:PullGet its head ref.- Specified by:
headin interfacePull- Returns:
- Head ref
- Throws:
IOException- If there is any I/O problem
-