1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues

Issues

Issue #6594 resolved

Branch Merger Trigger Webhook with no Branch Info

William Li
created an issue

I use BitBucket with DeployHQ and Flowdock. When we push to BitBucket, it notifies both service for a build and a notification.

I noticed that if I merge a branch together on SourceTree and push it back to Bitbucket, BitBucket will fire off events to webhooks with branch name as "null".

You can see from the screenshot of Flowdock. If it's a new commit, it is fine (dev branch in screenshot) but when I merge the changes into other branch and push, Flowdock will report as null...

DeployHQ also uses the branch info to trigger build for different branches... so it doesn't know which branch to build when I merge.

Comments (12)

  1. Erik van Zijst staff

    I can't reproduce this problem (or I'm misunderstanding what you're saying).

    I've set up a post commit service and had it post to posttestserver.com. I created 2 branches locally, committed to both and then merged the second branch into my master. Then I pushed and the following was the result:

    :::sh
    http://posttestserver.com/data/2013/03/07/erik/15.40.171340568044
    

    In there I can see that my last commit (the merge) correctly has its branch property set to master.

    Are you seeing something different? If so, can you capture an actual payload like I did so I can have a look?

  2. Erik van Zijst staff

    Ok, I had a closer look at the code and here are the rules wrt branch information on commit:

    1. Non-branch heads never have branch or branches set
    2. Commits that are pointed to by exactly one branch have branch set
    3. Commits that are pointed to by multiple branches have branches set

    I would agree that these rules are somewhat confusing :)

  3. Log in to comment