Class GHPullRequest
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.bases.ClassBase
io.github.coho04.githubapi.entities.GHPullRequest
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
Represents a GitHub Pull Request.
This class provides methods and properties to access information about a pull request in a GitHub repository.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGHPullRequest
(Github github, org.json.JSONObject jsonObject) Constructs a new GHPullRequest instance with the provided JSON object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the reason for locking the pull request.Returns the assignee of the pull request.Returns the list of assignees of the pull request.Returns the author association of the pull request.Returns the auto merge setting of the pull request.getBody()
Returns the body content of the pull request.Returns the closing date and time of the pull request.Returns the URL for fetching comments on the pull request.Returns the URL for fetching commits on the pull request.Returns the creation date and time of the pull request.Returns the URL for fetching the diff of the pull request.Returns the URL of the issue associated with the pull request.Returns the list of labels associated with the pull request.Returns the merge commit SHA of the pull request.Returns the merging date and time of the pull request.Returns the milestone associated with the pull request.int
Returns the number of the pull request.Returns the URL for fetching the patch of the pull request.Returns the list of users requested for review of the pull request.Returns the list of teams requested for review of the pull request.Returns the URL for fetching review comments on the pull request.Returns the URL for fetching a specific review comment on the pull request.getState()
Returns the state of the pull request.Returns the URL for fetching statuses of the pull request.getTitle()
Returns the title of the pull request.Returns the last updated date and time of the pull request.getUser()
Returns the user who created the pull request.boolean
isDraft()
Returns whether the pull request is in draft state.boolean
isLocked()
Returns whether the pull request is locked.Methods inherited from class io.github.coho04.githubapi.bases.ClassBase
getEventsUrl, getHtmlUrl, getId, getNodeId, getUrl, toJSONObject
Methods inherited from class io.github.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequest
Methods inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Constructor Details
-
GHPullRequest
Constructs a new GHPullRequest instance with the provided JSON object.- Parameters:
jsonObject
- the JSON object containing the pull request data
-
-
Method Details
-
getCreatedAt
Returns the creation date and time of the pull request.- Returns:
- the creation date and time of the pull request
-
getUpdatedAt
Returns the last updated date and time of the pull request.- Returns:
- the last updated date and time of the pull request
-
getState
Returns the state of the pull request.- Returns:
- the state of the pull request
-
getBody
Returns the body content of the pull request.- Returns:
- the body content of the pull request
-
getNumber
public int getNumber()Returns the number of the pull request.- Returns:
- the number of the pull request
-
getMilestone
Returns the milestone associated with the pull request.- Returns:
- the milestone associated with the pull request
-
getAssignee
Returns the assignee of the pull request.- Returns:
- the assignee of the pull request
-
getUser
Returns the user who created the pull request.- Returns:
- the user who created the pull request
-
getLabels
Returns the list of labels associated with the pull request.- Returns:
- the list of labels
-
getActiveLockReason
Returns the reason for locking the pull request.- Returns:
- the active lock reason
-
getIssueUrl
Returns the URL of the issue associated with the pull request.- Returns:
- the issue URL
-
getAssignees
Returns the list of assignees of the pull request.- Returns:
- the list of assignees
-
getRequestedTeams
Returns the list of teams requested for review of the pull request.- Returns:
- the list of requested teams
-
getRequestedReviewers
Returns the list of users requested for review of the pull request.- Returns:
- the list of requested reviewers
-
getClosedAt
Returns the closing date and time of the pull request.- Returns:
- the closing date and time of the pull request
-
getCommentsUrl
Returns the URL for fetching comments on the pull request.- Returns:
- the comments URL
-
getCommitsUrl
Returns the URL for fetching commits on the pull request.- Returns:
- the commits URL
-
getDiffUrl
Returns the URL for fetching the diff of the pull request.- Returns:
- the diff URL
-
getMergedAt
Returns the merging date and time of the pull request.- Returns:
- the merging date and time of the pull request
-
getAuthorAssociation
Returns the author association of the pull request.- Returns:
- the author association of the pull request
-
getMergeCommitSha
Returns the merge commit SHA of the pull request.- Returns:
- the merge commit SHA
-
getPatchUrl
Returns the URL for fetching the patch of the pull request.- Returns:
- the patch URL
-
getReviewCommentsUrl
Returns the URL for fetching review comments on the pull request.- Returns:
- the review comments URL
-
getReviewCommentUrl
Returns the URL for fetching a specific review comment on the pull request.- Returns:
- the review comment URL
-
getAutoMerge
Returns the auto merge setting of the pull request.- Returns:
- the auto merge setting
-
getStatusesUrl
Returns the URL for fetching statuses of the pull request.- Returns:
- the statuses URL
-
getTitle
Returns the title of the pull request.- Returns:
- the title of the pull request
-
isLocked
public boolean isLocked()Returns whether the pull request is locked.- Returns:
- true if the pull request is locked, false otherwise
-
isDraft
public boolean isDraft()Returns whether the pull request is in draft state.- Returns:
- true if the pull request is in draft state, false otherwise
-