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 class
GHRepositoryDiscussion.Category
Category of a discussion.static class
GHRepositoryDiscussion.State
The 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 String
getActiveLockReason()
Gets the active lock reason.Date
getAnswerChosenAt()
Gets the answer chosen at.GHUser
getAnswerChosenBy()
Gets the answer chosen by.URL
getAnswerHtmlUrl()
Gets the answer html url.GHCommentAuthorAssociation
getAuthorAssociation()
Gets the author association.String
getBody()
Gets the body.GHRepositoryDiscussion.Category
getCategory()
Gets the category.int
getComments()
Gets the comments.URL
getHtmlUrl()
Gets the html url.int
getNumber()
Gets the number.GitHub
getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.GHRepositoryDiscussion.State
getState()
Gets the state.String
getTimelineUrl()
Gets the timeline url.String
getTitle()
Gets the title.GHUser
getUser()
Gets the user.boolean
isLocked()
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:
getHtmlUrl
in 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 theGitHub
instance, use a local copy instead of pulling it out of objects.Get the rootGitHub
instance for this object.- Returns:
- the root
GitHub
instance
-
-