public class SimpleMergeHookRequest extends AbstractRepositoryHookRequest implements MergeHookRequest
MergeHookRequest
Modifier and Type | Class and Description |
---|---|
static class |
SimpleMergeHookRequest.Builder |
AbstractRepositoryHookRequest.AbstractBuilder<B extends AbstractRepositoryHookRequest.AbstractBuilder<B>>
Modifier and Type | Method and Description |
---|---|
RepositoryRef |
getFromRef() |
Optional<String> |
getMergeHash() |
Optional<String> |
getMessage() |
Collection<RefChange> |
getRefChanges() |
Optional<String> |
getStrategyId() |
RepositoryRef |
getToRef() |
boolean |
isCrossRepository() |
getContext, getRepository, getScmHookDetails, getTrigger, isDryRun
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext, getRepository, getScmHookDetails, getTrigger, isDryRun
@Nonnull public RepositoryRef getFromRef()
getFromRef
in interface MergeHookRequest
target branch
@Nonnull public Optional<String> getMergeHash()
getMergeHash
in interface MergeHookRequest
Optional.empty()
if this is a dry-run
request.@Nonnull public Optional<String> getMessage()
getMessage
in interface MergeHookRequest
Optional.empty()
if this is a dry-run
request.@Nonnull public Collection<RefChange> getRefChanges()
getRefChanges
in interface RepositoryHookRequest
getRefChanges
in class AbstractRepositoryHookRequest
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 for merge requests
. In these cases, the specialized request type should
provide sufficient information about the proposed change. For MergeHookRequest
, this would be
MergeHookRequest.getFromRef()
and MergeHookRequest.getToRef()
.@Nonnull public Optional<String> getStrategyId()
getStrategyId
in interface MergeHookRequest
@Nonnull public RepositoryRef getToRef()
getToRef
in interface MergeHookRequest
public boolean isCrossRepository()
isCrossRepository
in interface MergeHookRequest
true
if the from-ref
and the to-ref
are in different
repositories, otherwise false
Copyright © 2022 Atlassian. All rights reserved.