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

Pull request updated webhook payload has a different commit hash size than other webhooks

XMLWordPrintable

      Issue Summary

      The PR:updated or PR:created webhooks truncate commit hashes instead of giving you the full commit hash.

      This is a problem mainly with workflows that require git fetch to be executed - Git fetch requires the full commit hash, so this limitation actively breaks certain workflows

      Steps to Reproduce

      1. Create a webhook that has PR:updated or PR:Created as its event
      2. Trigger the PR:updated/PR:createdevent by updating a Pull request
      3. You should be able to see that the payload truncates the commit SHA field to have only the first 12 characters of the commit SHA

      Expected Results

      The complete commit SHA should be sent on the payload, like this:

      [...]
      {"commitId":"abc15321e9fa3485898703e88d3a72a6161adf4b",
      [...]
      

      Actual Results

      Only the first 12 characters of the commit SHA are sent on the PR:Updated or PR:Created events:

      [...]
      {"commitId":"abc15321e9fa",
      [...]
      

      Workaround

      Currently, there is no way to work around this, in case you require the hook payload to run Git fetch.
      A workaround will be added here when available

              Unassigned Unassigned
              lmontiel@atlassian.com Leonardo M
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: