public class GHIssue extends GHObject implements Reactable
GHRepository#getIssue(int),
GitHub#searchIssues(),
GHIssueSearchBuilder| Modifier and Type | Class and Description |
|---|---|
static class |
GHIssue.Label
Deprecated.
use
GHLabel |
static class |
GHIssue.PullRequest
The type PullRequest.
|
| Modifier and Type | Field and Description |
|---|---|
protected GHUser |
assignee |
protected GHUser[] |
assignees |
protected String |
body |
protected String |
closed_at |
protected GHUser |
closed_by |
protected int |
comments |
protected String |
html_url |
protected List<GHIssue.Label> |
labels |
protected boolean |
locked |
protected GHMilestone |
milestone |
protected int |
number |
protected GHIssue.PullRequest |
pull_request |
protected String |
state |
protected String |
title |
protected GHUser |
user |
created_at, id, responseHeaderFields, updated_at, url| Constructor and Description |
|---|
GHIssue() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssignees(Collection<GHUser> assignees)
Add assignees.
|
void |
addAssignees(GHUser... assignees)
Add assignees.
|
void |
addLabels(Collection<GHLabel> labels)
Add labels.
|
void |
addLabels(GHLabel... labels)
Add labels.
|
void |
addLabels(String... names)
Adds labels to the issue.
|
void |
assignTo(GHUser user)
Assign to.
|
void |
close()
Closes this issue.
|
GHIssueComment |
comment(String message)
Updates the issue by adding a comment.
|
GHReaction |
createReaction(ReactionContent content)
Deprecated.
|
protected String |
getApiRoute()
Gets api route.
|
URL |
getApiURL()
Gets api url.
|
GHUser |
getAssignee()
Gets assignee.
|
List<GHUser> |
getAssignees()
Gets assignees.
|
String |
getBody()
The description of this pull request.
|
Date |
getClosedAt()
Gets closed at.
|
GHUser |
getClosedBy()
Reports who has closed the issue.
|
List<GHIssueComment> |
getComments()
Obtains all the comments associated with this issue.
|
int |
getCommentsCount()
Gets comments count.
|
URL |
getHtmlUrl()
The HTML page of this issue, like https://github.com/jenkinsci/jenkins/issues/100
|
protected String |
getIssuesApiRoute()
Gets issues api route.
|
Collection<GHLabel> |
getLabels()
Gets labels.
|
protected static List<String> |
getLogins(Collection<GHUser> users) |
GHMilestone |
getMilestone()
Gets milestone.
|
int |
getNumber()
ID.
|
GHIssue.PullRequest |
getPullRequest()
Returns non-null if this issue is a shadow of a pull request.
|
GHRepository |
getRepository()
Repository to which the issue belongs.
|
GHIssueState |
getState()
Gets state.
|
String |
getTitle()
Gets title.
|
GHUser |
getUser()
User who submitted the issue.
|
boolean |
isLocked()
Is locked boolean.
|
boolean |
isPullRequest()
Is pull request boolean.
|
PagedIterable<GHIssueComment> |
listComments()
Obtains all the comments associated with this issue.
|
PagedIterable<GHIssueEvent> |
listEvents()
Lists events for this issue.
|
PagedIterable<GHReaction> |
listReactions()
Deprecated.
|
void |
lock()
Lock.
|
void |
removeAssignees(Collection<GHUser> assignees)
Remove assignees.
|
void |
removeAssignees(GHUser... assignees)
Remove assignees.
|
void |
removeLabels(Collection<GHLabel> labels)
Remove labels.
|
void |
removeLabels(GHLabel... labels)
Remove labels.
|
void |
removeLabels(String... names)
Remove a given label by name from this issue.
|
void |
reopen()
Reopens this issue.
|
void |
setAssignees(Collection<GHUser> assignees)
Sets assignees.
|
void |
setAssignees(GHUser... assignees)
Sets assignees.
|
void |
setBody(String body)
Sets body.
|
void |
setLabels(String... labels)
Sets labels.
|
void |
setMilestone(GHMilestone milestone)
Sets milestone.
|
void |
setTitle(String title)
Sets title.
|
void |
unlock()
Unlock.
|
getCreatedAt, getId, getResponseHeaderFields, getUpdatedAt, getUrl, toStringprotected GHUser assignee
protected GHUser[] assignees
protected String state
protected int number
protected String closed_at
protected int comments
protected String body
protected List<GHIssue.Label> labels
protected GHUser user
protected String title
protected String html_url
protected GHIssue.PullRequest pull_request
protected GHMilestone milestone
protected GHUser closed_by
protected boolean locked
public GHRepository getRepository()
public String getBody()
public int getNumber()
public URL getHtmlUrl()
getHtmlUrl in class GHObjectpublic String getTitle()
public boolean isLocked()
public GHIssueState getState()
public Collection<GHLabel> getLabels() throws IOException
IOException - the io exceptionpublic Date getClosedAt()
public URL getApiURL()
public void lock()
throws IOException
IOException - the io exceptionpublic void unlock()
throws IOException
IOException - the io exception@WithBridgeMethods(value=void.class) public GHIssueComment comment(String message) throws IOException
message - the messageIOException - the io exceptionpublic void close()
throws IOException
IOException - the io exceptionpublic void reopen()
throws IOException
IOException - the io exceptionpublic void setTitle(String title) throws IOException
title - the titleIOException - the io exceptionpublic void setBody(String body) throws IOException
body - the bodyIOException - the io exceptionpublic void setMilestone(GHMilestone milestone) throws IOException
milestone - the milestoneIOException - the io exceptionpublic void assignTo(GHUser user) throws IOException
user - the userIOException - the io exceptionpublic void setLabels(String... labels) throws IOException
labels - the labelsIOException - the io exceptionpublic void addLabels(String... names) throws IOException
names - Names of the labelIOException - the io exceptionpublic void addLabels(GHLabel... labels) throws IOException
labels - the labelsIOException - the io exceptionpublic void addLabels(Collection<GHLabel> labels) throws IOException
labels - the labelsIOException - the io exceptionpublic void removeLabels(String... names) throws IOException
names - the namesIOException - the io exceptionpublic void removeLabels(GHLabel... labels) throws IOException
labels - the labelsIOException - the io exception#removeLabels(String...)public void removeLabels(Collection<GHLabel> labels) throws IOException
labels - the labelsIOException - the io exceptionpublic List<GHIssueComment> getComments() throws IOException
IOException - the io exception#listComments()public PagedIterable<GHIssueComment> listComments() throws IOException
IOException - the io exception@Preview @Deprecated public GHReaction createReaction(ReactionContent content) throws IOException
ReactablecreateReaction in interface Reactablecontent - the contentIOException - the io exception@Preview @Deprecated public PagedIterable<GHReaction> listReactions()
ReactablelistReactions in interface Reactablepublic void addAssignees(GHUser... assignees) throws IOException
assignees - the assigneesIOException - the io exceptionpublic void addAssignees(Collection<GHUser> assignees) throws IOException
assignees - the assigneesIOException - the io exceptionpublic void setAssignees(GHUser... assignees) throws IOException
assignees - the assigneesIOException - the io exceptionpublic void setAssignees(Collection<GHUser> assignees) throws IOException
assignees - the assigneesIOException - the io exceptionpublic void removeAssignees(GHUser... assignees) throws IOException
assignees - the assigneesIOException - the io exceptionpublic void removeAssignees(Collection<GHUser> assignees) throws IOException
assignees - the assigneesIOException - the io exceptionprotected String getApiRoute()
protected String getIssuesApiRoute()
public GHUser getAssignee() throws IOException
IOException - the io exceptionpublic GHUser getUser() throws IOException
IOException - the io exceptionpublic GHUser getClosedBy() throws IOException
Note that GitHub doesn't always seem to report this information even for an issue that's already closed. See https://github.com/kohsuke/github-api/issues/60.
IOException - the io exceptionpublic int getCommentsCount()
public GHIssue.PullRequest getPullRequest()
public boolean isPullRequest()
public GHMilestone getMilestone()
protected static List<String> getLogins(Collection<GHUser> users)
public PagedIterable<GHIssueEvent> listEvents() throws IOException
IOException - the io exceptionCopyright © 2020. All rights reserved.