Package com.jcabi.github
Interface Issue
- All Superinterfaces:
Comparable<Issue>,JsonPatchable,JsonReadable
- All Known Implementing Classes:
Issue.Smart,SfIssue
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
- See Also:
- 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 ClassesModifier and TypeInterfaceDescriptionstatic final classSmart Issue with extra features. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncomments()Get all comments of the issue.events()Get all events of the issue.booleanexists()Does this issue exist in GitHub?booleanisLocked()The issue conversation is locked?labels()Get all labels of the issue.voidLocks the issue.intnumber()Get its number.voidAdds the reaction to the issue.List the reactions of the issue.repo()Repository we're in.voidunlock()Unlocks the issue.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.jcabi.github.JsonPatchable
patchMethods inherited from interface com.jcabi.github.JsonReadable
json
-
Field Details
-
OPEN_STATE
Issue state.- See Also:
-
CLOSED_STATE
Issue state.- See Also:
-
-
Method Details
-
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:
-
labels
IssueLabels labels()Get all labels of the issue.- Returns:
- Labels
- See Also:
-
events
Get all events of the issue.- Returns:
- Events
- Throws:
IOException- If there is any I/O problem- See Also:
-
exists
Does this issue exist in GitHub?- Returns:
- TRUE if this issue exists
- Throws:
IOException- If there is any I/O problem
-
react
Adds the reaction to the issue.- Parameters:
reaction- Reaction to be added.- Throws:
IOException- If there is any I/O problem
-
reactions
List the reactions of the issue.- Returns:
- Issue reactions.
-
lock
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.
-