-
Suggestion
-
Resolution: Fixed
-
None
Problem Definition
When writing a pre-receive hook for Bitbucket, it's quite difficult to get the new commits being pushed, especially if the RefChange is an UPDATE.
When doing validation on, for example, the commit message of new commits, or validating the commit in some other way, a rev-list command is required to determine which commits are "new" and need to be checked.
Why should we do this?
It would be more efficient if Bitbucket provided a way to access these new commits in some way, as all consumers of the API could use the list of Commits provided by Bitbucket, and would not have to fork their own process to get the same information.
We just published the updated developer documentation for 5.0, which includes a guide on how to use the new API (including code examples): https://developer.atlassian.com/bitbucket/server/docs/5.0.0/how-tos/hooks-merge-checks-guide.html