Package com.jcabi.github
Interface Issue
-
- All Superinterfaces:
Comparable<Issue>,JsonPatchable,JsonReadable
- All Known Implementing Classes:
Issue.Smart,SfIssue
@Immutable public interface Issue extends Comparable<Issue>, JsonReadable, JsonPatchable
Github issue.Use a supplementary "smart" decorator to get other properties from an issue, for example:
Issue.Smart issue = new Issue.Smart(origin); if (issue.isOpen()) { issue.close(); }- Since:
- 0.1
- Version:
- $Id: ba8cb9827fa813e3e40b72511cc1bf93d9704245 $
- Author:
- Yegor Bugayenko (yegor256@gmail.com)
- See Also:
- Issues API
- To do:
- #1462:30min Implement lock reason validation. According to documentation lock reason must belong to a specific value domain. This validation must be performed in lock method and tests must be added to ensure that the class is accepting the correct values and rejecting the wrong ones.
- Suppressed Checkstyle violations:
- MultipleStringLiterals (500 lines)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIssue.SmartSmart Issue with extra features.
-
Field Summary
Fields Modifier and Type Field Description static StringCLOSED_STATEIssue state.static StringOPEN_STATEIssue state.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Commentscomments()Get all comments of the issue.Iterable<Event>events()Get all events of the issue.booleanexists()Does this issue exist in Github?booleanisLocked()The issue conversation is locked?IssueLabelslabels()Get all labels of the issue.voidlock(String reason)Locks the issue.intnumber()Get its number.voidreact(Reaction reaction)Adds the reaction to the issue.Iterable<Reaction>reactions()List the reactions of the issue.Reporepo()Repository we're in.voidunlock()Unlocks the issue.-
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
-
-
-
-
Field Detail
-
OPEN_STATE
static final String OPEN_STATE
Issue state.- See Also:
- Constant Field Values
-
CLOSED_STATE
static final String CLOSED_STATE
Issue state.- See Also:
- Constant Field Values
-
-
Method Detail
-
repo
Repo repo()
Repository we're in.- Returns:
- Repo
-
number
int number()
Get its number.- Returns:
- Issue number
-
comments
Comments comments()
Get all comments of the issue.- Returns:
- Comments
- See Also:
- Issue Comments API
-
labels
IssueLabels labels()
Get all labels of the issue.- Returns:
- Labels
- See Also:
- Labels API
-
events
Iterable<Event> events() throws IOException
Get all events of the issue.- Returns:
- Events
- Throws:
IOException- If there is any I/O problem- See Also:
- List Events for an Issue
-
exists
boolean exists() throws IOExceptionDoes this issue exist in Github?- Returns:
- TRUE if this issue exists
- Throws:
IOException- If there is any I/O problem
-
react
void react(Reaction reaction) throws IOException
Adds the reaction to the issue.- Parameters:
reaction- Reaction to be added.- Throws:
IOException- If there is any I/O problem
-
lock
void lock(String reason)
Locks the issue.- Parameters:
reason- Lock reason
-
unlock
void unlock()
Unlocks the issue.
-
isLocked
boolean isLocked()
The issue conversation is locked?- Returns:
- If the issue is locked.
-
-