public interface PostRepositoryHook<T extends com.atlassian.bitbucket.hook.repository.RepositoryHookRequest>
Hooks are called asynchronously by default, but implementors can annotate their implementation class with
SynchronousPreferred
to signal that the hook should be called synchronously. This gives the hook access
to the SCM client's output and error streams if the hook is triggered by a
push
to the repository.
If a hook is marked as SynchronousPreferred
, the implementor should ensure that the hook does not take a
long time to execute, since the repository push will not finish until all hooks have completed.
SynchronousPreferred
Modifier and Type | Method and Description |
---|---|
void |
postUpdate(PostRepositoryHookContext context,
T request)
Callback method that is called after a request to update one or more
refs is completed. |
void postUpdate(@Nonnull PostRepositoryHookContext context, @Nonnull T request)
refs
is completed.context
- provides hook settings and a way to obtain the commits added/removedrequest
- provides details about the refs that have been updatedCopyright © 2024 Atlassian. All rights reserved.