public interface BulkRescopeContext extends Iterable<PullRequestRescope>
pull request rescopes when a repository is updated.
 
 For the SCM it does not matter what pull request is being rescoped by each of the
 rescopes. To keep the SPI as simple and flexible as possible, only the repositories and
 the hashes are made available. The pull requests are not provided. The provided rescopes may be subsequent rescopes
 of the same pull request, rescopes for different pull requests or a mix. At the SCM level it's irrelevant.
 
The rescopes are guaranteed to:
oldFromHash will differ from the newFromHash, the oldToHash will
         differ from the newToHash, or botholdFromHash, oldToHash or newToHash equal to null. Only
         newFromHash can ever be null. A null newToHash would always result in a decline
         of the pull request, which the system can detect without the SCM. A null newFromHash on the other
         hand could result in a decline or a merge, depending on whether the from-branch has been merged into the
         to-branch before it was deleted.newFromHash is null, the SCM shall
     Merge the pull request if the SCM allows updating multiple branches in a single push
           and the oldFromHash is now reachable from the
           newToHash, orDecline the pull request if its commits have not been merged to the targetMerge: If the source or target ref for the pull request has been
         updated in such a way that there are no commits on the source that are not also on the target, the SCM
         shall classify the rescope as merging the pull request, with 1 exception (detailed below)
     merge callback.Update: If new commits have been added
         to the source or target refs,
         the SCM shall classify the rescope as updating the pull request. The SCM shall also detect
         how many commits, if any, have been added to and removed from the scope of the pull request, which is defined
         as the commits that are reachable from the source ref, but not the target ref. The SCM shall not
         provide more than getMaxCommitIds() commit IDs in the addedCommitIds or
         removedCommitIds lists.
     
     rescope in the context may be classified exactly once. Additionally,
 only rescopes retrieved from the context may be provided back
 to it for declining, merging or
 update(PullRequestRescope, RescopeDetails, RescopeDetails)  updating}.| Modifier and Type | Method and Description | 
|---|---|
| void | decline(PullRequestRescope rescope)Marks the rescope as  decliningthe associated pull request. | 
| int | getMaxCommitIds() | 
| void | merge(PullRequestRescope rescope,
     String mergeHash)Marks the rescope as  remotely mergingthe associated pull request. | 
| void | update(PullRequestRescope rescope,
      com.atlassian.bitbucket.pull.RescopeDetails addedCommits,
      com.atlassian.bitbucket.pull.RescopeDetails removedCommits)Marks the rescope as updating one or both of the associated pull request's
  fromandtorefs. | 
forEach, iterator, spliteratorvoid decline(@Nonnull PullRequestRescope rescope)
declining the associated pull request.rescope - the rescopeIllegalArgumentException - if the provided rescope was not returned by this contextint getMaxCommitIds()
update(PullRequestRescope, RescopeDetails, RescopeDetails)void merge(@Nonnull PullRequestRescope rescope, @Nullable String mergeHash)
remotely merging the associated pull request.
 When a pull request is remotely merged, the SCM can optionally detect and provide the commit which actually carried out the merge. It is only required to detect that the pull request's refs have changed in a way which removes all of the pull request's incoming commits.
rescope - the rescopemergeHash - the merge hashIllegalArgumentException - if the provided rescope was not returned by this contextvoid update(@Nonnull PullRequestRescope rescope, @Nonnull com.atlassian.bitbucket.pull.RescopeDetails addedCommits, @Nonnull com.atlassian.bitbucket.pull.RescopeDetails removedCommits)
from and to refs.
 The SCM is required to not only detect that the rescope does not merge or decline the pull request, it is also required to detect how many and which commits were added and/or removed from the scope of the pull request.
 For performance reasons, only a limited number of commit IDs should be returned. Implementors should call
 getMaxCommitIds() to discover how many commit IDs can be returned.
rescope - the rescopeaddedCommits - details about how many and what commits were added to the the pull requestremovedCommits - details about how many and what commits were removed from the pull requestIllegalArgumentException - if the provided rescope was not returned by this contextCopyright © 2024 Atlassian. All rights reserved.