public interface

HookScriptConfig

com.atlassian.bitbucket.hook.script.HookScriptConfig

Class Overview

Configures a HookScript to run for a given scope, and defines the triggers for which it should be invoked.

A single script can be configured multiple times for different scopes. In such cases, the configuration for the most specific scope supersedes less specific ones. For example, if a script is configured at both project and repository level, the repository-level configuration overrides and replaces the project-level config for that repository; the two are not merged.

When a script is configured for a given scope, it is invoked according to its type. Configuration cannot override type. If a given script implements a pre-style hook, it can only be run as a PreRepositoryHook. Configuration only controls what scopes a script is run for, and for which triggers.

Summary

Public Methods
@Nonnull Scope getScope()
@Nonnull HookScript getScript()
@Nonnull Set<String> getTriggerIds()

Public Methods

@Nonnull public Scope getScope ()

Returns
  • the scope for which the script is configured

@Nonnull public HookScript getScript ()

Returns
  • the configured script

@Nonnull public Set<String> getTriggerIds ()

Returns
  • a set of trigger IDs for which the script should be invoked, with an empty denoting all triggers