Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-7439

Git post commit hook payloads has empty commits field for large commits (BB-8636)

    XMLWordPrintable

Details

    Description

      We use the post commit hook to read details of the last commit made. However, for commits with large number of files, the payload we receive has an empty "commits" list

      Here's the repro:

      1. Clone the repository at https://bitbucket.org/kudutest/bitbucketlargepayload. It has a single commit that includes about 5000 files.
      2. Create a new Git repository on Bitbucket
      3. In this new repo, set up a POST hook from the services tab to point to a receiver (I used http://requestb.in/)
      4. Push the cloned repository to the new repo

      Expected: The payload contains specifics about the commit

      Actual: The commits field is empty. Here's what the payload looks like:

      { "canon_url": "https://bitbucket.org", "commits": [], "repository":

      { "absolute_url": "/kudutest/bitbucketlargepayload/", "fork": false, "is_private": false, "name": "BitbucketLargePayload", "owner": "kudutest", "scm": "git", "slug": "bitbucketlargepayload", "website": "" }

      , "truncated": true, "user": "kudutest" }

      Consequent commits with fewer files correctly populate the "commits" field. I'm not sure if this is a recent change in behavior or if it has always been the case.

      Attachments

        Activity

          People

            Unassigned Unassigned
            4274b6700ab2 pranavkm
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: