Class SimpleMergeHookRequest
java.lang.Object
com.atlassian.bitbucket.hook.repository.AbstractRepositoryHookRequest
com.atlassian.bitbucket.hook.repository.SimpleMergeHookRequest
- All Implemented Interfaces:
MergeHookRequest,RepositoryHookRequest
public class SimpleMergeHookRequest
extends AbstractRepositoryHookRequest
implements MergeHookRequest
Basic implementation of
MergeHookRequest- Since:
- 5.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.atlassian.bitbucket.hook.repository.AbstractRepositoryHookRequest
AbstractRepositoryHookRequest.AbstractBuilder<B extends AbstractRepositoryHookRequest.AbstractBuilder<B>> -
Method Summary
Methods inherited from class com.atlassian.bitbucket.hook.repository.AbstractRepositoryHookRequest
getContext, getRepository, getScmHookDetails, getTrigger, isDryRunMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bitbucket.hook.repository.RepositoryHookRequest
getContext, getRepository, getScmHookDetails, getTrigger, isDryRun
-
Method Details
-
getFromRef
- Specified by:
getFromRefin interfaceMergeHookRequest- Returns:
- the branch or tag being merged into the
target branch
-
getMergeHash
- Specified by:
getMergeHashin interfaceMergeHookRequest- Returns:
- the merge commit hash. Can be
Optional.empty()if this is adry-runrequest.
-
getMessage
- Specified by:
getMessagein interfaceMergeHookRequest- Returns:
- the commit message. Can be
Optional.empty()if this is adry-runrequest.
-
getRefChanges
- Specified by:
getRefChangesin interfaceRepositoryHookRequest- Overrides:
getRefChangesin classAbstractRepositoryHookRequest- Returns:
- the proposed ref changes. Can be
emptyfor some dry-run requests where the target hash is not yet known because the relevant commit hasn't been created yet. As an example, this is the case formerge requests. In these cases, the specialized request type should provide sufficient information about the proposed change. ForMergeHookRequest, this would beMergeHookRequest.getFromRef()andMergeHookRequest.getToRef().
-
getStrategyId
- Specified by:
getStrategyIdin interfaceMergeHookRequest- Returns:
- the merge strategy ID
- Since:
- 5.5
-
getToRef
- Specified by:
getToRefin interfaceMergeHookRequest- Returns:
- the target branch
-
isCrossRepository
public boolean isCrossRepository()- Specified by:
isCrossRepositoryin interfaceMergeHookRequest- Returns:
trueif thefrom-refand theto-refare in different repositories, otherwisefalse
-