Welcome to the Jazz Community Forum
Identify Git Commits via Jazz Plain Api

Hello all,
I would like to list all Git commits linked to a work item.
With the following code I'm able to list links to work items as well as links to change sets, but I miss the linked git commits.
ILinkQueryPage workItemLinks2 = linkManager.findLinks(workItemRef, monitor);
ILinkCollection links2 = workItemLinks2.getAllLinksFromHereOn();
for(ILink l2 : links2){
System.out.println("All Links: " + l2.getLinkTypeId() + ", ID: " + l2.getItemId());
}
What do I have to do to list Git commits?
Many thanks in advance and kind regards,
Christine
Accepted answer

I'd suggest to follow https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/ and use the analyze references. There are various link types available, also as constants and you can try to find them this way. I have not found the constant so far.