It's all about the answers!

Ask a question

Identify Git Commits via Jazz Plain Api

Christine Makasy (73823) | asked Nov 30 '17, 5:02 a.m.

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,

Accepted answer

permanent link
Ralph Schoon (62.7k33643) | answered Nov 30 '17, 5:34 a.m.

I'd suggest to follow 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.

Christine Makasy selected this answer as the correct answer

Your answer

Register or to post your answer.