public interface

PullRequest

implements Commentable PropertySupport Watchable
com.atlassian.bitbucket.pull.PullRequest

Summary

Fields
public static final Function<PullRequestLong> TO_ID This field is deprecated. in 4.0 for removal in 5.0. With Java 8, PullRequest::getId can be used instead.
Public Methods
@Nonnull PullRequestParticipant getAuthor()
@Nonnull Date getCreatedDate()
@Nullable @OptionalString String getDescription()
@Nonnull PullRequestRef getFromRef()
long getId()
@Nonnull Set<PullRequestParticipant> getParticipants()
@Nonnull Set<PullRequestParticipant> getReviewers()
@Nonnull PullRequestState getState()
@Nonnull @RequiredString String getTitle()
@Nonnull PullRequestRef getToRef()
@Nonnull Date getUpdatedDate()
int getVersion()
boolean isClosed()
Retrieves a flag indicating whether this pull request is closed.
boolean isCrossRepository()
Retrieves a flag indicating whether the from and to repositories for this pull request are distinct.
boolean isLocked()
boolean isOpen()
Retrieves a flag indicating whether this pull request is open.
[Expand]
Inherited Methods
From interface com.atlassian.bitbucket.comment.Commentable
From interface com.atlassian.bitbucket.property.PropertySupport
From interface com.atlassian.bitbucket.watcher.Watchable

Fields

public static final Function<PullRequestLong> TO_ID

This field is deprecated.
in 4.0 for removal in 5.0. With Java 8, PullRequest::getId can be used instead.

A reusable Function for extracting IDs from pull requests.

Public Methods

@Nonnull public PullRequestParticipant getAuthor ()

Returns
  • the creating author of the pull request

@Nonnull public Date getCreatedDate ()

Returns
  • the date when the pull request was created

@Nullable @OptionalString public String getDescription ()

Returns
  • the description associated with the pull request (limit to 32k) or null if none was specified

@Nonnull public PullRequestRef getFromRef ()

Returns
  • the ref containing the changes to review and merge

public long getId ()

Returns
  • the repository-scoped identifier of the pull request

@Nonnull public Set<PullRequestParticipant> getParticipants ()

Returns
  • the non-reviewing participants attached to the pull request

@Nonnull public Set<PullRequestParticipant> getReviewers ()

Returns
  • the reviewing participants attached to the pull request

@Nonnull public PullRequestState getState ()

Returns
  • the state (e.g. opened, merged or declined) of the pull request

@Nonnull @RequiredString public String getTitle ()

Returns
  • the mandatory title of the pull request

@Nonnull public PullRequestRef getToRef ()

Returns
  • the ref the changes should be merged to

@Nonnull public Date getUpdatedDate ()

Returns
  • the last update of the pull request

public int getVersion ()

Returns
  • the current version of the pull request

public 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

public 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

public boolean isLocked ()

Returns
  • true if the pull request is locked internally; otherwise false

public 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