POST Service data has no commit info after 'git merge'

A few months back, I made a custom POST receiver that waited for changes in the 'staging' branch of our application and automatically ran our local update scripts. This worked for a few months just fine - the process was to work in 'dev' and merge into 'staging' when we were ready for testing.

However, at some point this stopped working. The problem as I see it is that the commit information is completely empty when merging from one branch to another. Here is an example:

This is the POST data after a merge from 'dev' into 'staging' branch:

{"repository": {"website": "", "fork": false, "name": "REDACTED", "scm": "git", "owner": "REDACTED", "absolute_url": "REDACTED", "slug": "REDACTED", "is_private": true}, "truncated": false, "commits": [], "canon_url": "https://bitbucket.org", "user": "REDACTED"}

Note this section: "commits": []

With no information about the merge, I can't tell if our staging branch was updated or not. This commit message looks like nothing happened at all, which is definitely not the case. How am I supposed to find this information?

1 answer

1 accepted

This is a current limitation of the POST hook. If there isn't new commits entering the repository, we won't report them in the payload of the commit hooks. We've got this issue open to change that behavior. Please vote on it!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,745 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you