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

    • GHPullRequest

      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

    • getCreatedAt

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

      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

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

      public String 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public String 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