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 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, isDryRun
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.bitbucket.hook.repository.RepositoryHookRequest
getContext, getRepository, getScmHookDetails, getTrigger, isDryRun
-
Method Details
-
getFromRef
- Specified by:
getFromRef
in interfaceMergeHookRequest
- Returns:
- the branch or tag being merged into the
target branch
-
getMergeHash
- Specified by:
getMergeHash
in interfaceMergeHookRequest
- Returns:
- the merge commit hash. Can be
Optional.empty()
if this is adry-run
request.
-
getMessage
- Specified by:
getMessage
in interfaceMergeHookRequest
- Returns:
- the commit message. Can be
Optional.empty()
if this is adry-run
request.
-
getRefChanges
- Specified by:
getRefChanges
in interfaceRepositoryHookRequest
- Overrides:
getRefChanges
in classAbstractRepositoryHookRequest
- Returns:
- the proposed ref changes. Can be
empty
for 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:
getStrategyId
in interfaceMergeHookRequest
- Returns:
- the merge strategy ID
- Since:
- 5.5
-
getToRef
- Specified by:
getToRef
in interfaceMergeHookRequest
- Returns:
- the target branch
-
isCrossRepository
public boolean isCrossRepository()- Specified by:
isCrossRepository
in interfaceMergeHookRequest
- Returns:
true
if thefrom-ref
and theto-ref
are in different repositories, otherwisefalse
-