Class GHPullRequest

All Implemented Interfaces:
HttpRequestInterface, JSONHelper

public class GHPullRequest extends ClassBase
Represents a GitHub Pull Request. This class provides methods and properties to access information about a pull request in a GitHub repository.
  • Constructor Details Link icon

    • GHPullRequest Link icon

      public GHPullRequest(Github github, org.json.JSONObject jsonObject)
      Constructs a new GHPullRequest instance with the provided JSON object.
      Parameters:
      jsonObject - the JSON object containing the pull request data
  • Method Details Link icon

    • getCreatedAt Link icon

      public OffsetDateTime getCreatedAt()
      Returns the creation date and time of the pull request.
      Returns:
      the creation date and time of the pull request
    • getUpdatedAt Link icon

      public OffsetDateTime getUpdatedAt()
      Returns the last updated date and time of the pull request.
      Returns:
      the last updated date and time of the pull request
    • getState Link icon

      public GHState getState()
      Returns the state of the pull request.
      Returns:
      the state of the pull request
    • getBody Link icon

      public String getBody()
      Returns the body content of the pull request.
      Returns:
      the body content of the pull request
    • getNumber Link icon

      public int getNumber()
      Returns the number of the pull request.
      Returns:
      the number of the pull request
    • getMilestone Link icon

      public GHMilestone getMilestone()
      Returns the milestone associated with the pull request.
      Returns:
      the milestone associated with the pull request
    • getAssignee Link icon

      public GHUser getAssignee()
      Returns the assignee of the pull request.
      Returns:
      the assignee of the pull request
    • getUser Link icon

      public GHUser getUser()
      Returns the user who created the pull request.
      Returns:
      the user who created the pull request
    • getLabels Link icon

      public List<GHLabel> getLabels()
      Returns the list of labels associated with the pull request.
      Returns:
      the list of labels
    • getActiveLockReason Link icon

      public String getActiveLockReason()
      Returns the reason for locking the pull request.
      Returns:
      the active lock reason
    • getIssueUrl Link icon

      public String getIssueUrl()
      Returns the URL of the issue associated with the pull request.
      Returns:
      the issue URL
    • getAssignees Link icon

      public List<GHUser> getAssignees()
      Returns the list of assignees of the pull request.
      Returns:
      the list of assignees
    • getRequestedTeams Link icon

      public List<GHUser> getRequestedTeams()
      Returns the list of teams requested for review of the pull request.
      Returns:
      the list of requested teams
    • getRequestedReviewers Link icon

      public List<GHUser> getRequestedReviewers()
      Returns the list of users requested for review of the pull request.
      Returns:
      the list of requested reviewers
    • getClosedAt Link icon

      public OffsetDateTime getClosedAt()
      Returns the closing date and time of the pull request.
      Returns:
      the closing date and time of the pull request
    • getCommentsUrl Link icon

      public String getCommentsUrl()
      Returns the URL for fetching comments on the pull request.
      Returns:
      the comments URL
    • getCommitsUrl Link icon

      public String getCommitsUrl()
      Returns the URL for fetching commits on the pull request.
      Returns:
      the commits URL
    • getDiffUrl Link icon

      public String getDiffUrl()
      Returns the URL for fetching the diff of the pull request.
      Returns:
      the diff URL
    • getMergedAt Link icon

      public OffsetDateTime getMergedAt()
      Returns the merging date and time of the pull request.
      Returns:
      the merging date and time of the pull request
    • getAuthorAssociation Link icon

      public String getAuthorAssociation()
      Returns the author association of the pull request.
      Returns:
      the author association of the pull request
    • getMergeCommitSha Link icon

      public String getMergeCommitSha()
      Returns the merge commit SHA of the pull request.
      Returns:
      the merge commit SHA
    • getPatchUrl Link icon

      public String getPatchUrl()
      Returns the URL for fetching the patch of the pull request.
      Returns:
      the patch URL
    • getReviewCommentsUrl Link icon

      public String getReviewCommentsUrl()
      Returns the URL for fetching review comments on the pull request.
      Returns:
      the review comments URL
    • getReviewCommentUrl Link icon

      public String getReviewCommentUrl()
      Returns the URL for fetching a specific review comment on the pull request.
      Returns:
      the review comment URL
    • getAutoMerge Link icon

      public String getAutoMerge()
      Returns the auto merge setting of the pull request.
      Returns:
      the auto merge setting
    • getStatusesUrl Link icon

      public String getStatusesUrl()
      Returns the URL for fetching statuses of the pull request.
      Returns:
      the statuses URL
    • getTitle Link icon

      public String getTitle()
      Returns the title of the pull request.
      Returns:
      the title of the pull request
    • isLocked Link icon

      public boolean isLocked()
      Returns whether the pull request is locked.
      Returns:
      true if the pull request is locked, false otherwise
    • isDraft Link icon

      public boolean isDraft()
      Returns whether the pull request is in draft state.
      Returns:
      true if the pull request is in draft state, false otherwise