Package com.jcabi.github
Class Issue.Smart
java.lang.Object
com.jcabi.github.Issue.Smart
- All Implemented Interfaces:
Issue,JsonPatchable,JsonReadable,Comparable<Issue>
- Enclosing interface:
- Issue
Smart Issue with extra features.
- Since:
- 0.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jcabi.github.Issue
Issue.Smart -
Field Summary
Fields inherited from interface com.jcabi.github.Issue
CLOSED_STATE, OPEN_STATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAssign this issue to another user.assignee()Get its assignee.author()Get its author.body()Get its body.voidChange its body.voidclose()Close it (make sure it's closed).closedAt()When this issue was closed.comments()Get all comments of the issue.intWhen this issue was created.events()Get all events of the issue.booleanexists()Does this issue exist in GitHub?booleanHas assignee?booleanhasBody()Has body?booleanDoes issue have milestone?htmlUrl()Get its HTML URL.booleanisLocked()The issue conversation is locked?booleanisOpen()Is it open?booleanisPull()Is it a pull request?jakarta.json.JsonObjectjson()Describe it in a JSON object.labels()Get all labels of the issue.latestEvent(String type) Get the latest event of a given type.voidLocks the issue.Get milestone for this issue.voidAdd issueto milestone.intnumber()Get its number.voidopen()Open it (make sure it's open).voidpatch(jakarta.json.JsonObject json) Patch using this JSON object.pull()Get pull request.voidAdds the reaction to the issue.List the reactions of the issue.repo()Repository we're in.roLabels()Get read-only labels.state()Get its state.voidChange its state.title()Get its title.voidChange its title.voidunlock()Unlocks the issue.When this issue was updated.url()Get its URL.
-
Constructor Details
-
Smart
Public ctor.- Parameters:
iss- Issue
-
-
Method Details
-
author
Get its author.- Returns:
- Author of issue (who submitted it)
- Throws:
IOException- If there is any I/O problem
-
isOpen
Is it open?- Returns:
- TRUE if it's open
- Throws:
IOException- If there is any I/O problem
-
open
Open it (make sure it's open).- Throws:
IOException- If there is any I/O problem
-
close
Close it (make sure it's closed).- Throws:
IOException- If there is any I/O problem
-
state
Get its state.- Returns:
- State of issue
- Throws:
IOException- If there is any I/O problem
-
state
Change its state.- Parameters:
state- State of issue- Throws:
IOException- If there is any I/O problem
-
title
Get its title.- Returns:
- Title of issue
- Throws:
IOException- If there is any I/O problem
-
title
Change its title.- Parameters:
text- Title of issue- Throws:
IOException- If there is any I/O problem
-
body
Get its body.- Returns:
- Body of issue
- Throws:
IOException- If there is any I/O problem
-
body
Change its body.- Parameters:
text- Body of issue- Throws:
IOException- If there is any I/O problem
-
hasBody
Has body?- Returns:
- TRUE if body exists
- Throws:
IOException- If there is any I/O problem- Since:
- 0.22
-
hasAssignee
Has assignee?- Returns:
- TRUE if assignee exists
- Throws:
IOException- If there is any I/O problem
-
assignee
Get its assignee.- Returns:
- User Assignee of issue
- Throws:
IOException- If there is any I/O problem
-
assign
Assign this issue to another user.- Parameters:
login- Login of the user to assign to- Throws:
IOException- If there is any I/O problem
-
url
Get its URL.- Returns:
- URL of issue
- Throws:
IOException- If there is any I/O problem
-
htmlUrl
Get its HTML URL.- Returns:
- URL of issue
- Throws:
IOException- If there is any I/O problem
-
createdAt
When this issue was created.- Returns:
- Date of creation
- Throws:
IOException- If there is any I/O problem
-
closedAt
When this issue was closed.- Returns:
- Date of creation
- Throws:
IOException- If there is any I/O problem- Since:
- 0.34
-
updatedAt
When this issue was updated.- Returns:
- Date of update
- Throws:
IOException- If there is any I/O problem
-
isPull
Is it a pull request?- Returns:
- TRUE if it is a pull request
- Throws:
IOException- If there is any I/O problem
-
pull
Get pull request.- Returns:
- Pull request
- Throws:
IOException- If there is any I/O problem
-
latestEvent
Get the latest event of a given type. ThrowsIllegalStateExceptionif the issue has no events of the given type.- Parameters:
type- Type of event- Returns:
- Latest event of the given type
- Throws:
IOException- If there is any I/O problem
-
roLabels
Get read-only labels.- Returns:
- Collection of labels
- Throws:
IOException- If there is any I/O problem- Since:
- 0.6.2
-
hasMilestone
Does issue have milestone?- Returns:
- True if has
- Throws:
IOException- If fails
-
milestone
Get milestone for this issue.- Returns:
- Milestone
- Throws:
IOException- If fails
-
milestone
Add issueto milestone.- Parameters:
milestone- Milestone- Throws:
IOException- If fails
-
repo
Description copied from interface:IssueRepository we're in. -
number
public int number()Description copied from interface:IssueGet its number. -
comments
Description copied from interface:IssueGet all comments of the issue. -
labels
Description copied from interface:IssueGet all labels of the issue. -
events
Description copied from interface:IssueGet all events of the issue.- Specified by:
eventsin interfaceIssue- Returns:
- Events
- 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<Issue>
-
exists
Description copied from interface:IssueDoes this issue exist in GitHub?- Specified by:
existsin interfaceIssue- Returns:
- TRUE if this issue exists
- Throws:
IOException- If there is any I/O problem
-
react
Description copied from interface:IssueAdds the reaction to the issue. -
reactions
Description copied from interface:IssueList the reactions of the issue. -
lock
Description copied from interface:IssueLocks the issue. -
unlock
public void unlock()Description copied from interface:IssueUnlocks the issue. -
isLocked
public boolean isLocked()Description copied from interface:IssueThe issue conversation is locked?
-