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.
void postUpdate(@Nonnull PostRepositoryHookContext context, @Nonnull T request)
context- provides hook settings and a way to obtain the commits added/removed
request- provides details about the refs that have been updated
Copyright © 2021 Atlassian. All rights reserved.