public interface HookScript extends MinimalHookScript
A script represents some form of executable, such as a shell script or binary, which can be run in response to repository changes. Scripts are managed separately from the repositories where they're enabled to simplify the process of administering them. For example, if a given script is enabled in 2,000 different repositories, it can be updated in, or deleted from, all of them simultaneously with a single operation.
Modifier and Type | Method and Description |
---|---|
Date |
getCreatedDate() |
Optional<String> |
getDescription()
Retrieves the script's description.
|
String |
getName()
Retrieves the script's name.
|
String |
getPluginKey()
Retrieves the plugin key for the app which created the script.
|
int |
getSize() |
HookScriptType |
getType()
Retrieves the script's type.
|
Date |
getUpdatedDate() |
getId, getVersion
@Nonnull Optional<String> getDescription()
@Nonnull String getName()
When a pre
-style hook script rejects an update, the script's name is included
in the veto
added to the
hook result
. Like a filename, hook
script names should be short, but descriptive. (However, unlike a filename, filesystem limitations do
not apply to hook script names.)
@Nonnull String getPluginKey()
When a script is created, the app which creates it must provide its plugin key. This allows scripts to be associated with the app that created them, for administrative purposes.
Note: App developers are strongly discouraged from changing their plugin keys. While the key associated with a hook script can be updated later, this is only one of many references the overall system may have to an app's plugin key.
int getSize()
@Nonnull HookScriptType getType()
Hook scripts can be written to be invoked as PreRepositoryHook
s or PostRepositoryHook
s.
The type must be specified when the script is created, and cannot be updated after.
Copyright © 2019 Atlassian. All rights reserved.