com.atlassian.bitbucket.hook.script.HookScript |
Describes a hook script.
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.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves the script's description.
| |||||||||||
Retrieves the script's name.
| |||||||||||
Retrieves the plugin key for the app which created the script.
| |||||||||||
Retrieves the script's type.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.bitbucket.hook.script.MinimalHookScript
|
Retrieves the script's description. Descriptions are limited to 255 characters but are otherwise free-form.
Retrieves the script's name. Names are limited to 255 characters but are otherwise free-form.
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.)
Retrieves the plugin key for the app which created the script. Plugin keys are limited to 255 characters.
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.
Retrieves the script's type.
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.