/
How to disable hooks using Bitbucket Command Line Interface
How to disable hooks using Bitbucket Command Line Interface
This article explains how to disable a hook in a Bitbucket repository using Command Line Interface (CLI)
Instructions
Using the disableHook action, a pre-receive or post-receive hook can be disabled from a repository of Bitbucket.
--action disableHook --project "PROJ" --repository "repo-1" --hook "Reject Force Push"
In above CLI action,
--project value refers to Project key, name, or id.
- --repository value refers to Repository slug, name, or id.
- --hook value refers to Hook name or key of the form plugin key:hook key.
- To check the status of the hook, navigate to Repositories > Repository settings > Hooks. The hook is disabled as shown in the screenshot below:
It is recommended to test this scenario in a non-production environment or run the action with the --simulate parameter to verify the behavior before deploying.
Related content
disableHook
disableHook
More like this
removeWebhook
removeWebhook
More like this
Restrict repository settings changes in Bitbucket
Restrict repository settings changes in Bitbucket
More like this
Enable Debug Logging
Enable Debug Logging
More like this
declinePullRequest
declinePullRequest
More like this
Manage Pages for Bitbucket
Manage Pages for Bitbucket
More like this