@Deprecated public interface

PreReceiveRepositoryHook

implements RepositoryHookImplementor
com.atlassian.bitbucket.hook.repository.PreReceiveRepositoryHook

This interface is deprecated.
since 5.0 for removal in 6.0. Implement PreRepositoryHook instead.

Class Overview

Configured and enabled Repository Hook that is called just before a push request is completed.

This is used in preference over PreReceiveHook in circumstances where a standard configuration is required. This hook can also be enabled/disabled at the repository level.

Summary

Public Methods
boolean onReceive(RepositoryHookContext context, Collection<RefChange> refChanges, HookResponse hookResponse)
Callback method that is called just before a push request is completed.

Public Methods

public boolean onReceive (RepositoryHookContext context, Collection<RefChange> refChanges, HookResponse hookResponse)

Callback method that is called just before a push request is completed. This hook executes during the processing of a push and the client will have to wait during the execution of the onReceive method.

Parameters
context the context which the hook is being run with
refChanges the refs that are about to be updated
hookResponse used to write to the client's stdout and/or stderr
Returns
  • true if the push request is to be accepted, false if it should be rejected. Note that returning true does not guarantee that the push will be accepted as there may be other PreReceiveHooks that reject the push.