Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Hash format in Pull Request event payloads (Webhooks)

Rimas Luksys September 22, 2022

Hi there,

Is there a reason why Pull Request event payloads include just a part of Git commit hash (first 12 characters) rather than all 40 characters?

"commit" : { "hash" :  "d3022fc0ca3d" }

Repository event payloads include full Git commit hashes:

"target": {  "type": "commit",
  "hash": "d3022fc0ca3d65c7f6654eea129d6bf0cf0ee08e",
  ...

Are there any plans to change this in the future?

https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/

Thank you!

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 26, 2022

Hi Rimas,

We have a report about this in our issue tracker:

The first two comments in that issue are from our developers, you can read them for an explanation of why this is occurring as well as workarounds on how to get the full hash.

If we change this now there is a risk of breaking any client or application that was dependent on only the short version of the hash. So any solution would need to take this into account as well and it's not likely that this will be fixed in the short term.

I would recommend selecting the option "This affects my team" in the bug report to indicate you are affected by this and you are also welcome to leave a comment with your feedback there. You can also select the "Start watching this issue" option in the ticket if you'd like to get notified via email on updates.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events