org.kohsuke.github
Class GHIssue

java.lang.Object
  extended by org.kohsuke.github.GHIssue
Direct Known Subclasses:
GHPullRequest

public class GHIssue
extends Object

Represents an issue on GitHub.

Author:
Eric Maupin, Kohsuke Kawaguchi

Nested Class Summary
static class GHIssue.Label
           
static class GHIssue.PullRequest
           
 
Field Summary
protected  GHUser assignee
           
protected  String body
           
protected  String closed_at
           
protected  GHUser closed_by
           
protected  int comments
           
protected  String created_at
           
protected  String html_url
           
protected  int id
           
protected  List<GHIssue.Label> labels
           
protected  GHMilestone milestone
           
protected  int number
           
protected  GHIssue.PullRequest pull_request
           
protected  String state
           
protected  String title
           
protected  String updated_at
           
protected  String url
           
protected  GHUser user
           
 
Constructor Summary
GHIssue()
           
 
Method Summary
 void assignTo(GHUser user)
           
 void close()
          Closes this issue.
 void comment(String message)
          Updates the issue by adding a comment.
protected  String getApiRoute()
           
 URL getApiURL()
           
 GHUser getAssignee()
           
 String getBody()
          The description of this pull request.
 Date getClosedAt()
           
 GHUser getClosedBy()
           
 List<GHIssueComment> getComments()
          Obtains all the comments associated with this issue.
 int getCommentsCount()
           
 Date getCreatedAt()
           
 Collection<GHIssue.Label> getLabels()
           
 GHMilestone getMilestone()
           
 int getNumber()
          ID.
 GHIssue.PullRequest getPullRequest()
           
 GHRepository getRepository()
          Repository to which the issue belongs.
 GHIssueState getState()
           
 String getTitle()
           
 Date getUpdatedAt()
           
 URL getUrl()
          The HTML page of this issue, like https://github.com/jenkinsci/jenkins/issues/100
 GHUser getUser()
          User who submitted the issue.
 PagedIterable<GHIssueComment> listComments()
          Obtains all the comments associated with this issue.
 void reopen()
          Reopens this issue.
 void setBody(String body)
           
 void setLabels(String... labels)
           
 void setTitle(String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

assignee

protected GHUser assignee

state

protected String state

number

protected int number

closed_at

protected String closed_at

comments

protected int comments

body

protected String body

labels

protected List<GHIssue.Label> labels

user

protected GHUser user

title

protected String title

created_at

protected String created_at

html_url

protected String html_url

pull_request

protected GHIssue.PullRequest pull_request

milestone

protected GHMilestone milestone

url

protected String url

updated_at

protected String updated_at

id

protected int id

closed_by

protected GHUser closed_by
Constructor Detail

GHIssue

public GHIssue()
Method Detail

getRepository

public GHRepository getRepository()
Repository to which the issue belongs.


getBody

public String getBody()
The description of this pull request.


getNumber

public int getNumber()
ID.


getUrl

public URL getUrl()
The HTML page of this issue, like https://github.com/jenkinsci/jenkins/issues/100


getTitle

public String getTitle()

getState

public GHIssueState getState()

getLabels

public Collection<GHIssue.Label> getLabels()

getCreatedAt

public Date getCreatedAt()

getUpdatedAt

public Date getUpdatedAt()

getClosedAt

public Date getClosedAt()

getApiURL

public URL getApiURL()

comment

public void comment(String message)
             throws IOException
Updates the issue by adding a comment.

Throws:
IOException

close

public void close()
           throws IOException
Closes this issue.

Throws:
IOException

reopen

public void reopen()
            throws IOException
Reopens this issue.

Throws:
IOException

setTitle

public void setTitle(String title)
              throws IOException
Throws:
IOException

setBody

public void setBody(String body)
             throws IOException
Throws:
IOException

assignTo

public void assignTo(GHUser user)
              throws IOException
Throws:
IOException

setLabels

public void setLabels(String... labels)
               throws IOException
Throws:
IOException

getComments

public List<GHIssueComment> getComments()
                                 throws IOException
Obtains all the comments associated with this issue.

Throws:
IOException
See Also:
listComments()

listComments

public PagedIterable<GHIssueComment> listComments()
                                           throws IOException
Obtains all the comments associated with this issue.

Throws:
IOException

getApiRoute

protected String getApiRoute()

getAssignee

public GHUser getAssignee()

getUser

public GHUser getUser()
User who submitted the issue.


getClosedBy

public GHUser getClosedBy()

getCommentsCount

public int getCommentsCount()

getPullRequest

public GHIssue.PullRequest getPullRequest()

getMilestone

public GHMilestone getMilestone()


Copyright © 2014. All rights reserved.