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

Git server-side "pre-receive" hook (BB-11418)

XMLWordPrintable

    • 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.

      There are multiple cases when development teams want to check the push to the remote repository and either accept or reject it. Some may check branch names, commit messages, fast-forward merges, etc. to ensure the development process follows some particular rules.

      Currently, it does not seem to be possible with Bitbucket to use this functionality that actually comes out of the box with Git. The user does not have access to the actual remote repository to manage that. However, it can be provided in a different way using the approach similar to Bitbucket Hooks' POST request. When the repository gets triggered on "pre-receive" event, it could execute HTTP POST request supplying all the information from the push, and accept it if the POST request returns 200 or reject if any other HTTP code. This would still not require to provide direct access to the remote repository, but the users could still handle commits and reject them using their specific rules.

      PS Related but less generalized ticket:

      Enhancement BCLOUD-5658 Allow custom pre-receive hook that rejects commits without an issue key in their message

              57465700c4e1 Edmund Munday
              1856873e5d88 Maxim Novikov
              Votes:
              1159 Vote for this issue
              Watchers:
              453 Start watching this issue

                Created:
                Updated: