A hook that enforces a pull request for configurable Git branches
Configure Git branches to protect
Either use specific ref-ids (e.g., "refs/heads/master") or Bitbucket's branch permission patterns (e.g., "releases/**") to protect Git branches from pushes without pull requests.
Generate ASCII art hook message
Use your own hook message or generate a beautiful ASCII art which a user sees when trying to push without a pull request. Pushes by service users (e.g., a CI system) and already reviewed changes can be ignored.
No push without pull request
This hook prevents pushes to any of the specified Git ref-ids without a pull request. The user is informed by the configured error message why a push is not allowed.
- Supports specific values (e.g., "refs/heads/master") and patterns known from Bitbucket's branch permissions page (e.g., "releases/**") to protect Git references from pushes without pull requests
- Configurable users (e.g., the release or integration manager) can be allowed to push directly
- Service users (e.g., a CI system connecting to Stash/Bitbucket Server with an access key) can be allowed to push directly
- Pushes to branches of open pull requests can be allowed
- Supports the creation of beautiful ASCII art messages which makes the hook message stand out in the console of the user
More Bitbucket apps you'll like:
✔️ Helps teams improve their software development process and cycle time by making the most out of pull requests - Pull Request Analytics for Bitbucket
Mibex helps teams build better software faster. We build Git and DevOps analytics tools to help teams ship better software faster. View more of our Atlassian apps here. 😁
Privacy and security