1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #10170 open

Add pre-commit hook support to validate commits message format, rejects commits if validation fails

Brendan Mannix
created an issue

Bitbucket should support a configurable pre-commit hook. In fact, bitbucket should support all client side hooks.

NOTE: I am not referring to a pre-receive or a post-receive server-side hook.

The rational provided by Atlasian for not allowing hooks is that it would allow people to run arbitrary code on their servers. However, I do not see a reason to prevent any client side hooks from being configured.

Comments (15)

  1. Rutwick Jain

    Pre-commit hooks are very useful to enforce a stricter commit policy. I wanted to enable pre-commit hook at server-side to prevent any commit being pushed if they are not following any particular rule. A case in point is, every commit message in our project should contain the JIRA ID. In case it is not present, the commit should not be pushed to the repository.

    Any update would be helpful.

  2. Log in to comment