Is there an interface (Java) to see if a hook is enabled/disabled? I only need access inside of it's own class.
Is this going to be a Catch-22 scenario, where the class doesn't fire if the hook is disabled?
Hi Justin,
You can use RepositoryHookService.getByKey to retrieve the RepositoryHook for a given repository and hook-key. You can then call RepositoryHook.isEnabled to determine whether it's enabled.
Cheers,
Michael
Hi Micheal,
Using STASH CLI, is it possible to check if a hook is enabled or disabled in STASH ?
Thanks
You can use the REST api to retrieve the hooks for a repository: https://developer.atlassian.com/static/rest/stash/3.0.4/stash-rest.html#idp2872560
Thanks Micheal. As I am not experienced in REST, it would be great if you can share some sample script if it exist with you. Thanks
It looks like you're new here. Sign in or register to get started.