Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains how to disable a hook in a Bitbucket repository using Command Line Interface (CLI)

Instructions

  1. With Through the disableHook action, a Pre pre-receive or Post receive Hook in post-receive hook can be disabled from a repository of Bitbucket can be disabled
  2. Refer to the below-given sample action command to disable a hook.:

    Code Block
    themeMidnight
    --action disableHook --project "PROJ" --repository "repo-1" --hook "Reject Force Push"


  3. To check the status of the hook, navigate to Repositories → Repository settings → Hooks. The hook will can be disabled as shown in the screenshot below.:
    Image RemovedImage Added


Info

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.

...