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

Issues

Issue #9762 duplicate

Hook POST missing branchs

Alpha Nieves
created an issue

When I received the payload data of hook POST only last commit node have the branch name.

As you can see in this payload data, the push have 3 commits:

  • 1) branch: null
  • 2) branch: null
  • 3) branch: memcache
{
    "repository": {
        "website"     : "",
        "fork"        : false,
        "name"        : "company",
        "scm"         : "git",
        "owner"       : "company_web",
        "absolute_url": "/company_web/company/",
        "slug"        : "company",
        "is_private"  : true
    },
    "truncated" : false,
    "commits"   : [
        {
            "node"        : "79bbe25714f1",
            "files"       : [
                {
                    "type": "modified",
                    "file": "src/Auto/Cache/Cache.php"
                }
            ],
            "branches"    : [

            ],
            "raw_author"  : "Alpha Nieves ",
            "utctimestamp": "2014-06-25 08:07:54+00:00",
            "author"      : "alpha",
            "timestamp"   : "2014-06-25 10:07:54",
            "raw_node"    : "79bbe25714f1bf57663cd7d3bde96a55d0357e99",
            "parents"     : [
                "1786a7c07366"
            ],
            "branch"      : null,
            "message"     : "Error de typo, los proveedores cuelgan de cache\n",
            "revision"    : null,
            "size"        : -1
        },
        {
            "node"        : "1961cfef4e0a",
            "files"       : [
                {
                    "type": "modified",
                    "file": "src/Auto/Config/Config.php"
                }
            ],
            "branches"    : [

            ],
            "raw_author"  : "Alpha Nieves ",
            "utctimestamp": "2014-06-25 08:08:49+00:00",
            "author"      : "alpha",
            "timestamp"   : "2014-06-25 10:08:49",
            "raw_node"    : "1961cfef4e0ab479fd6bbe19f64687ec4709d751",
            "parents"     : [
                "79bbe25714f1"
            ],
            "branch"      : null,
            "message"     : "Implementamos un m\u00e9todo un poco r\u00fastico para reemplazar las variables like a Symfony\n",
            "revision"    : null,
            "size"        : -1
        },
        {
            "node"        : "3995e6b77834",
            "files"       : [
                {
                    "type": "modified",
                    "file": "src/Auto/Error/Error.php"
                }
            ],
            "raw_author"  : "Alpha Nieves ",
            "utctimestamp": "2014-06-25 08:09:19+00:00",
            "author"      : "alpha",
            "timestamp"   : "2014-06-25 10:09:19",
            "raw_node"    : "3995e6b77834e11f2dc47b4262cebf40dc501b3a",
            "parents"     : [
                "1961cfef4e0a"
            ],
            "branch"      : "memcache",
            "message"     : "Metemos los handlers en una funci\u00f3n est\u00e1tica para llamarlos de golpe like a boss\n",
            "revision"    : null,
            "size"        : -1
        }
    ],
    "canon_url" : "https://bitbucket.org",
    "user"      : "alpha"
}

Comments (2)

  1. Chris Somme staff

    This is due to a known issue with our hooks infrastructure.

    We're not doing a very good job adding branch labels on commits. A commit can be a part of more than one branch at a time. Currently, rather than reporting all branches that a commit is a part of, we only label commits corresponding to the branch head -- so you're only seeing the branch label on the most recent commit.

    Although it's not directly related to merging, I'm going to mark your issue as a duplicate of another issue we're tracking for POST hook improvements.

  2. Log in to comment