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

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

How to get HEAD Git hash with some Crucible REST API call?

Problem is:

somebody pushes changes (Git) into review, and I want to get HEAD Git hash. Currently I used EyeQL query like this

rest-service-fe/search-v1/queryAsRows/MyRepository?query=select revisions where in review "SOME-283" order by date desc return csid

and this query returns correct hash as first item in a list until somebody begin to use "git rebase". For example, he can modify some commit with interactive rebase, etc and to push it (with force option, I suppose). After such operation the query returns wrong hash. I tried different conditions (on branch/is head/etc) but it does not help.

Is any way to get Git hash of the HEAD in all cases? May be some undocumented REST call or something else? May be some plugin which can return such information? I mean hash of the last commit which is related to current state of the review, HEAD.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked in Jira Service Desk

Calling all Insight users, we need your help!

Hello Insight users,  As part of our (Mindville's) acquisition by Atlassian, our training team is looking to build some new Insight training materials. It would really helpful if you can ...

97 views 1 0
View question

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