Class PostRepositoryHookContext
java.lang.Object
com.atlassian.bitbucket.hook.repository.RepositoryHookContext
com.atlassian.bitbucket.hook.repository.PostRepositoryHookContext
RepositoryHookContext specialization that is provided to PostRepositoryHook hooks- Since:
- 5.0
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedPostRepositoryHookContext(com.atlassian.bitbucket.setting.Settings settings, boolean synchronous) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanabstract booleanregisterCommitCallback(RepositoryHookCommitCallback callback, RepositoryHookCommitFilter filter, RepositoryHookCommitFilter... moreFilters) Registers a callback to receive more information about commits added or removed.Methods inherited from class com.atlassian.bitbucket.hook.repository.RepositoryHookContextgetSettings
- 
Constructor Details- 
PostRepositoryHookContextprotected PostRepositoryHookContext(@Nonnull com.atlassian.bitbucket.setting.Settings settings, boolean synchronous) 
 
- 
- 
Method Details- 
isSynchronouspublic boolean isSynchronous()- Returns:
- trueif the hook is invoked synchronously, for instance as part of a- pushto the repository. Only hooks annotated with- SynchronousPreferredwill be invoked synchronously.
- See Also:
 
- 
registerCommitCallbackpublic abstract boolean registerCommitCallback(@Nonnull RepositoryHookCommitCallback callback, @Nonnull RepositoryHookCommitFilter filter, @Nullable RepositoryHookCommitFilter... moreFilters) Registers a callback to receive more information about commits added or removed. See the documentation onRepositoryHookCommitCallbackfor details about when the callback methods are called.- Parameters:
- callback- the callback
- filter- the type of commit details the callback is interested in
- moreFilters- other types of commit details the callback is interested in
- Returns:
- trueif the callback was successfully registered, otherwise- false. If- falseis returned here, the callback will not be called
 
 
-