Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What is the meaning of the "changes" field in a webhook push event? Edited

From the document, it tells me that

The details of the push, which includes the changes property. This property contains an array with all the references that the push updated and the following properties...  

But I still cannot understand what is a reference?

I've tested to make multiple commits in a single push and the changes field always contains a single element. (Multiple commits can be found in "commits" field under changes field)

What I want to know is that when will the changes field contains more than one element?

(I only care about push event)

 

Thanks if someone can provide an answer!

1 answer

Git documentation on references. Basically, for your purposes, it's either a branch or a tag. The 'type:' field in the message is either 'branch' or 'tag', and the 'name:' is a single word, like 'master' or 'v15.1', without the prefix (in Git proper, this would be 'refs/heads/master' and 'refs/tags/v15.1').

There is an array in the hook message, because a single Git push may send multiple branches and tags at once (take heed of the command syntax: it ends in '<refspec>…'. Even when you do just 'git push' with no arguments, depending on the local repo configuration settings, it may send along all tags added locally, or even push many branches at once.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

366 views 2 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you