Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-10170

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

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      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.

      Possible workaround:
      This workaround allows for all git clones with a working directory of this repository to use the same hooks. This hook would not be used in Bitbucket. git 2.9 allows for configuration of the hook path. Configuring the hook path allows for hooks to be shared.

      1. Make sure all clients are at git 2.9 or better.
      2. configure each git to use the hook path:
        • git config core.hooksPath .githooks
      3. Create .githooks folder in the repository and put hooks in that folder.

      Attachments

        Activity

          People

            Unassigned Unassigned
            legacy-bitbucket-user Legacy Bitbucket Cloud User (Inactive)
            Votes:
            33 Vote for this issue
            Watchers:
            46 Start watching this issue

            Dates

              Created:
              Updated: