• Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 5.0.0
    • Enterprise
    • None
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      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.

            [BSERV-9539] Improve PreReceiveHook API to provide new commits

            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

            Michael Heemskerk (Inactive) added a comment - 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

            Is there an explanation of what the changed API looks like for getting just the changed commits?

            Itay Neeman added a comment - Is there an explanation of what the changed API looks like for getting just the changed commits?

              mheemskerk Michael Heemskerk (Inactive)
              fhaehnel Felix (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: