public class SimplePullRequestMergeHookRequest extends AbstractRepositoryHookRequest implements PullRequestMergeHookRequest
PullRequestMergeHookRequest
Modifier and Type | Class and Description |
---|---|
static class |
SimplePullRequestMergeHookRequest.Builder |
AbstractRepositoryHookRequest.AbstractBuilder<B extends AbstractRepositoryHookRequest.AbstractBuilder<B>>
Modifier and Type | Method and Description |
---|---|
PullRequestRef |
getFromRef() |
Optional<String> |
getMergeHash() |
Optional<String> |
getMessage() |
PullRequest |
getPullRequest() |
Collection<RefChange> |
getRefChanges() |
Optional<String> |
getStrategyId() |
PullRequestRef |
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 PullRequestRef getFromRef()
getFromRef
in interface MergeHookRequest
getFromRef
in interface PullRequestMergeHookRequest
from-ref
@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 PullRequest getPullRequest()
getPullRequest
in interface PullRequestMergeHookRequest
@Nonnull public Optional<String> getStrategyId()
getStrategyId
in interface MergeHookRequest
@Nonnull public PullRequestRef getToRef()
getToRef
in interface MergeHookRequest
getToRef
in interface PullRequestMergeHookRequest
to-ref
@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()
.public boolean isCrossRepository()
isCrossRepository
in interface MergeHookRequest
true
if the from-ref
and the to-ref
are in different
repositories, otherwise false
Copyright © 2020 Atlassian. All rights reserved.