Package org.kohsuke.github
Class GHThread
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHThread
-
public class GHThread extends GHObject
A conversation in the notification API.- Author:
- Kohsuke Kawaguchi
- See Also:
- documentation,
GHNotificationStream
-
-
Field Summary
-
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GHCommitgetBoundCommit()If this thread is about a commit, return that commit.GHIssuegetBoundIssue()If this thread is about an issue, return that issue.GHPullRequestgetBoundPullRequest()If this thread is about a pull request, return that pull request.URLgetHtmlUrl()Deprecated.This object has no HTML URL.StringgetLastCommentUrl()Gets last comment url.DategetLastReadAt()Returns null if the entire thread has never been read.StringgetReason()Gets reason.GHRepositorygetRepository()Gets repository.GHSubscriptiongetSubscription()Returns the current subscription for this thread.StringgetTitle()Gets title.StringgetType()Gets type.booleanisRead()Is read boolean.voidmarkAsRead()Marks this thread as read.GHSubscriptionsubscribe(boolean subscribed, boolean ignored)Subscribes to this conversation to get notifications.-
Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
-
-
-
Method Detail
-
getLastReadAt
public Date getLastReadAt()
Returns null if the entire thread has never been read.- Returns:
- the last read at
-
getHtmlUrl
public URL getHtmlUrl()
Deprecated.This object has no HTML URL.Description copied from class:GHObjectGets html url.- Specified by:
getHtmlUrlin classGHObject- Returns:
- URL of this object for humans, which renders some HTML.
-
getReason
public String getReason()
Gets reason.- Returns:
- the reason
-
getRepository
public GHRepository getRepository()
Gets repository.- Returns:
- the repository
-
isRead
public boolean isRead()
Is read boolean.- Returns:
- the boolean
-
getTitle
public String getTitle()
Gets title.- Returns:
- the title
-
getType
public String getType()
Gets type.- Returns:
- the type
-
getLastCommentUrl
public String getLastCommentUrl()
Gets last comment url.- Returns:
- the last comment url
-
getBoundIssue
public GHIssue getBoundIssue() throws IOException
If this thread is about an issue, return that issue.- Returns:
- null if this thread is not about an issue.
- Throws:
IOException- the io exception
-
getBoundPullRequest
public GHPullRequest getBoundPullRequest() throws IOException
If this thread is about a pull request, return that pull request.- Returns:
- null if this thread is not about a pull request.
- Throws:
IOException- the io exception
-
getBoundCommit
public GHCommit getBoundCommit() throws IOException
If this thread is about a commit, return that commit.- Returns:
- null if this thread is not about a commit.
- Throws:
IOException- the io exception
-
markAsRead
public void markAsRead() throws IOExceptionMarks this thread as read.- Throws:
IOException- the io exception
-
subscribe
public GHSubscription subscribe(boolean subscribed, boolean ignored) throws IOException
Subscribes to this conversation to get notifications.- Parameters:
subscribed- the subscribedignored- the ignored- Returns:
- the gh subscription
- Throws:
IOException- the io exception
-
getSubscription
public GHSubscription getSubscription() throws IOException
Returns the current subscription for this thread.- Returns:
- null if no subscription exists.
- Throws:
IOException- the io exception
-
-