Package org.kohsuke.github
Class GHRepositoryDiscussion
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHRepositoryDiscussion
-
public class GHRepositoryDiscussion extends GHObject
A discussion in the repository.This is different from Teams discussions (see
GHDiscussion).The discussion event exposes the GraphQL object (more or less - the ids are handled differently for instance) directly. The new Discussions API is only available through GraphQL so for now you cannot execute any actions on this object.
- Author:
- Guillaume Smet
- See Also:
- The GraphQL API for Discussions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGHRepositoryDiscussion.CategoryCategory of a discussion.static classGHRepositoryDiscussion.StateThe Enum State.
-
Field Summary
-
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
-
Constructor Summary
Constructors Constructor Description GHRepositoryDiscussion()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetActiveLockReason()Gets the active lock reason.DategetAnswerChosenAt()Gets the answer chosen at.GHUsergetAnswerChosenBy()Gets the answer chosen by.URLgetAnswerHtmlUrl()Gets the answer html url.GHCommentAuthorAssociationgetAuthorAssociation()Gets the author association.StringgetBody()Gets the body.GHRepositoryDiscussion.CategorygetCategory()Gets the category.intgetComments()Gets the comments.URLgetHtmlUrl()Gets the html url.intgetNumber()Gets the number.GitHubgetRoot()Deprecated.For access to theGitHubinstance, use a local copy instead of pulling it out of objects.GHRepositoryDiscussion.StategetState()Gets the state.StringgetTimelineUrl()Gets the timeline url.StringgetTitle()Gets the title.GHUsergetUser()Gets the user.booleanisLocked()Checks if is locked.-
Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
-
-
-
Method Detail
-
getCategory
public GHRepositoryDiscussion.Category getCategory()
Gets the category.- Returns:
- the category
-
getAnswerHtmlUrl
public URL getAnswerHtmlUrl()
Gets the answer html url.- Returns:
- the answer html url
-
getAnswerChosenAt
public Date getAnswerChosenAt()
Gets the answer chosen at.- Returns:
- the answer chosen at
-
getAnswerChosenBy
public GHUser getAnswerChosenBy() throws IOException
Gets the answer chosen by.- Returns:
- the answer chosen by
- Throws:
IOException- Signals that an I/O exception has occurred.
-
getHtmlUrl
public URL getHtmlUrl()
Gets the html url.- Specified by:
getHtmlUrlin classGHObject- Returns:
- the html url
-
getNumber
public int getNumber()
Gets the number.- Returns:
- the number
-
getTitle
public String getTitle()
Gets the title.- Returns:
- the title
-
getUser
public GHUser getUser() throws IOException
Gets the user.- Returns:
- the user
- Throws:
IOException- Signals that an I/O exception has occurred.
-
getState
public GHRepositoryDiscussion.State getState()
Gets the state.- Returns:
- the state
-
isLocked
public boolean isLocked()
Checks if is locked.- Returns:
- true, if is locked
-
getComments
public int getComments()
Gets the comments.- Returns:
- the comments
-
getAuthorAssociation
public GHCommentAuthorAssociation getAuthorAssociation()
Gets the author association.- Returns:
- the author association
-
getActiveLockReason
public String getActiveLockReason()
Gets the active lock reason.- Returns:
- the active lock reason
-
getBody
public String getBody()
Gets the body.- Returns:
- the body
-
getTimelineUrl
public String getTimelineUrl()
Gets the timeline url.- Returns:
- the timeline url
-
getRoot
@Deprecated public GitHub getRoot()
Deprecated.For access to theGitHubinstance, use a local copy instead of pulling it out of objects.Get the rootGitHubinstance for this object.- Returns:
- the root
GitHubinstance
-
-