diff --git a/pkg/plugin/examples/js/js.yml b/pkg/plugin/examples/js/js.yml index 25f0d56e345..4a1d96d291a 100644 --- a/pkg/plugin/examples/js/js.yml +++ b/pkg/plugin/examples/js/js.yml @@ -52,6 +52,9 @@ hooks: - Tag.Create.Post - Tag.Update.Post - Tag.Destroy.Post + - File.Destroy.Post + - File.Update.Post + - File.Create.Post defaultArgs: mode: hook diff --git a/pkg/plugin/hook/hooks.go b/pkg/plugin/hook/hooks.go index a8235b1834d..428e99cf57f 100644 --- a/pkg/plugin/hook/hooks.go +++ b/pkg/plugin/hook/hooks.go @@ -48,6 +48,10 @@ const ( TagUpdatePost TriggerEnum = "Tag.Update.Post" TagMergePost TriggerEnum = "Tag.Merge.Post" TagDestroyPost TriggerEnum = "Tag.Destroy.Post" + + FileDestroyPost TriggerEnum = "File.Destroy.Post" + FileUpdatePost TriggerEnum = "File.Update.Post" + FileCreatePost TriggerEnum = "File.Create.Post" ) var AllHookTriggerEnum = []TriggerEnum{ @@ -87,6 +91,10 @@ var AllHookTriggerEnum = []TriggerEnum{ TagUpdatePost, TagMergePost, TagDestroyPost, + + FileDestroyPost, + FileUpdatePost, + FileCreatePost, } func (e TriggerEnum) IsValid() bool { @@ -124,6 +132,10 @@ func (e TriggerEnum) IsValid() bool { StudioUpdatePost, StudioDestroyPost, + FileDestroyPost, + FileUpdatePost, + FileCreatePost, + TagCreatePost, TagUpdatePost, TagDestroyPost: