Interface PullRequest

All Superinterfaces:
Commentable, PropertySupport, Watchable

public interface PullRequest extends PropertySupport, Commentable, Watchable
  • Method Details

    • getAuthor

      @Nonnull PullRequestParticipant getAuthor()
      Returns:
      the creating author of the pull request
    • getClosedDate

      @Nullable Date getClosedDate()
      Returns:
      the date the pull request was closed (i.e. last transitioned to PullRequestState.MERGED or PullRequestState.DECLINED; or null if the pull request is currently PullRequestState.OPEN
      Since:
      4.10
    • getCreatedDate

      @Nonnull Date getCreatedDate()
      Returns:
      the date when the pull request was created
    • getDescription

      @Nullable @OptionalString(size=32768) String getDescription()
      Returns:
      the description associated with the pull request (limit to 32k) or null if none was specified
    • getFromRef

      @Nonnull PullRequestRef getFromRef()
      Returns:
      the ref containing the changes to review and merge
    • getId

      long getId()
      Returns:
      the repository-scoped identifier of the pull request
    • getParticipants

      @Nonnull Set<PullRequestParticipant> getParticipants()
      Returns:
      the non-reviewing participants attached to the pull request
    • getReviewers

      @Nonnull Set<PullRequestParticipant> getReviewers()
      Returns:
      the reviewing participants attached to the pull request
    • getState

      @Nonnull PullRequestState getState()
      Returns:
      the state (e.g. opened, merged or declined) of the pull request
    • getTitle

      @Nonnull @RequiredString String getTitle()
      Returns:
      the mandatory title of the pull request
    • getToRef

      @Nonnull PullRequestRef getToRef()
      Returns:
      the ref the changes should be merged to
    • getUpdatedDate

      @Nonnull Date getUpdatedDate()
      Returns:
      the last update of the pull request
    • getVersion

      int getVersion()
      Returns:
      the current version of the pull request
    • isClosed

      boolean isClosed()
      Retrieves a flag indicating whether this pull request is closed. Declined and merged pull requests are both considered closed.
      Returns:
      true if this pull request is declined or merged, otherwise, false if it is open
    • isCrossRepository

      boolean isCrossRepository()
      Retrieves a flag indicating whether the from and to repositories for this pull request are distinct. This is a convenience utility to allow simple detection for pull requests that merge changes from one repository into another.
      Returns:
      true if this pull request will merge changes from one repository into another one; otherwise, false if the changes are simply on different branches in the same repository
    • isDraft

      boolean isDraft()
      Retrieves a flag indicating whether this pull request is a draft.
      Returns:
      true if this pull request is a draft; otherwise, false
      Since:
      8.18
    • isLocked

      boolean isLocked()
      Returns:
      true if the pull request is locked internally; otherwise false
    • isOpen

      boolean isOpen()
      Retrieves a flag indicating whether this pull request is open. Pull requests which have been declined or merged are considered closed.
      Returns:
      true if this pull request is open; otherwise, false if is declined or merged