public class FileEditHookRequest extends AbstractRepositoryHookRequest
repository-hook
plugin modules when a file is
edited
.ContentService.editFile(EditFileRequest)
,
StandardRepositoryHookTrigger
Modifier and Type | Class and Description |
---|---|
static class |
FileEditHookRequest.Builder |
AbstractRepositoryHookRequest.AbstractBuilder<B extends AbstractRepositoryHookRequest.AbstractBuilder<B>>
Modifier and Type | Method and Description |
---|---|
Branch |
getBranch() |
InputSupplier<InputStream> |
getContent() |
Optional<String> |
getMessage() |
String |
getPath() |
Collection<RefChange> |
getRefChanges() |
Optional<String> |
getSourceCommitId() |
getContext, getRepository, getScmHookDetails, getTrigger, isDryRun
@Nonnull public Branch getBranch()
@Nonnull public InputSupplier<InputStream> getContent()
@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> getMessage()
Optional.empty()
if this is a dry-run
request.Copyright © 2022 Atlassian. All rights reserved.