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 |
| 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 GHMilestone |
milestone |
protected int |
number |
protected GHIssue.PullRequest |
pull_request |
protected String |
state |
protected String |
title |
protected GHUser |
user |
created_at, id, updated_at, url| Constructor and Description |
|---|
GHIssue() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssignees(Collection<GHUser> assignees) |
void |
addAssignees(GHUser... assignees) |
void |
assignTo(GHUser user) |
void |
close()
Closes this issue.
|
GHIssueComment |
comment(String message)
Updates the issue by adding a comment.
|
GHReaction |
createReaction(ReactionContent content)
Deprecated.
|
protected String |
getApiRoute() |
URL |
getApiURL() |
GHUser |
getAssignee() |
List<GHUser> |
getAssignees() |
String |
getBody()
The description of this pull request.
|
Date |
getClosedAt() |
GHUser |
getClosedBy()
Reports who has closed the issue.
|
List<GHIssueComment> |
getComments()
Obtains all the comments associated with this issue.
|
int |
getCommentsCount() |
URL |
getHtmlUrl()
The HTML page of this issue,
like https://github.com/jenkinsci/jenkins/issues/100
|
protected String |
getIssuesApiRoute() |
Collection<GHLabel> |
getLabels() |
GHMilestone |
getMilestone() |
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() |
String |
getTitle() |
GHUser |
getUser()
User who submitted the issue.
|
boolean |
isPullRequest() |
PagedIterable<GHIssueComment> |
listComments()
Obtains all the comments associated with this issue.
|
PagedIterable<GHReaction> |
listReactions()
Deprecated.
|
void |
removeAssignees(Collection<GHUser> assignees) |
void |
removeAssignees(GHUser... assignees) |
void |
reopen()
Reopens this issue.
|
void |
setAssignees(Collection<GHUser> assignees) |
void |
setAssignees(GHUser... assignees) |
void |
setBody(String body) |
void |
setLabels(String... labels) |
void |
setTitle(String title) |
getCreatedAt, getId, 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
public GHRepository getRepository()
public String getBody()
public int getNumber()
public URL getHtmlUrl()
getHtmlUrl in class GHObjectpublic String getTitle()
public GHIssueState getState()
public Collection<GHLabel> getLabels() throws IOException
IOExceptionpublic Date getClosedAt()
public URL getApiURL()
@WithBridgeMethods(value=void.class) public GHIssueComment comment(String message) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic void reopen()
throws IOException
IOExceptionpublic void setTitle(String title) throws IOException
IOExceptionpublic void setBody(String body) throws IOException
IOExceptionpublic void assignTo(GHUser user) throws IOException
IOExceptionpublic void setLabels(String... labels) throws IOException
IOExceptionpublic List<GHIssueComment> getComments() throws IOException
IOExceptionlistComments()public PagedIterable<GHIssueComment> listComments() throws IOException
IOException@Preview @Deprecated public GHReaction createReaction(ReactionContent content) throws IOException
ReactablecreateReaction in interface ReactableIOException@Preview @Deprecated public PagedIterable<GHReaction> listReactions()
ReactablelistReactions in interface Reactablepublic void addAssignees(GHUser... assignees) throws IOException
IOExceptionpublic void addAssignees(Collection<GHUser> assignees) throws IOException
IOExceptionpublic void setAssignees(GHUser... assignees) throws IOException
IOExceptionpublic void setAssignees(Collection<GHUser> assignees) throws IOException
IOExceptionpublic void removeAssignees(GHUser... assignees) throws IOException
IOExceptionpublic void removeAssignees(Collection<GHUser> assignees) throws IOException
IOExceptionprotected String getApiRoute()
protected String getIssuesApiRoute()
public GHUser getAssignee()
public GHUser getUser()
public GHUser getClosedBy()
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.
public int getCommentsCount()
public GHIssue.PullRequest getPullRequest()
public boolean isPullRequest()
public GHMilestone getMilestone()
Copyright © 2017. All rights reserved.