public interface

PullRequestRebaseability

com.atlassian.bitbucket.scm.git.pull.PullRequestRebaseability

Summary

Public Methods
boolean canRebase()
Retrieves a flag indicating whether the necessary preconditions to perform a rebase are met.
boolean canWrite()
Retrieves a flag indicating whether the requesting user has write access to the pull request's source repository, which is required in order to perform a rebase.
@Nonnull Collection<PullRequestRebaseVeto> getVetoes()
Retrieves vetoes which prevent performing a rebase.

Public Methods

public boolean canRebase ()

Retrieves a flag indicating whether the necessary preconditions to perform a rebase are met. If there are any vetoes, or if the requesting user doesn't have write access, this will always be false.

Returns
  • true if the necessary preconditions for a rebase are met and no repository hooks vetoed the dry run; otherwise, false

public boolean canWrite ()

Retrieves a flag indicating whether the requesting user has write access to the pull request's source repository, which is required in order to perform a rebase. If the requesting user doesn't have write access to the source repository, in addition to this returning false, a veto is also added. If this returns false, canRebase will also return false.

Returns
  • true if the requesting user has write access to the pull request's source repository; otherwise, false

@Nonnull public Collection<PullRequestRebaseVeto> getVetoes ()

Retrieves vetoes which prevent performing a rebase.

Returns
  • a collection containing zero or more vetoes from com.atlassian.bitbucket.hook.repository.PreRepositoryHook PreRepositoryHooks used to validate rebase hook requests