It's all about the answers!

Ask a question

Adding links to git SCM via REST-API


0
1
Michael Kolb (111) | asked Oct 16 '17, 9:21 a.m.

Hello Everybody,

we are currently trying to integrate a Git repository (Bitbucket) into our ALM system. As we have no access to the server that runs the Git service, we cannot make use of the Git-Server-Toolkit (Hooks) provided by IBM.

I am already receiving post-receive information via a webhook from Bitbucket. The information is available in my custom service, but how do I interface with RTC to create links in the corresponding work items?

The git hooks by IBM use an API called "com.ibm.team.git.common.internal.IGitWorkItemInvokeService/UpdateWorkItemCommitLinks" for that. The word "internal" currently keeps me from using that endpoint.

Is there any official remotely accessible API to add commit links to workitems?

One answer



permanent link
Ralph Schoon (63.5k33646) | answered Oct 18 '17, 2:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

These posts explain the RTC Link API's I am aware of.:

https://rsjazz.wordpress.com/?s=link+API

They should also work for GIT links. You basically have to use the right endpoint types.

Please note: In the API a domain such as Jazz SCM or possibly GIT usually defines a jazz component. It is possible to limits the ability to create/modify to members of that jazz component. E.g. only members of the Jazz SCM Jazz component can create and update Change Set to Work Item links. So in some contexts, you might have to fake that you are member of the component in order to be able to do things.


Comments
Michael Kolb commented Oct 18 '17, 2:40 a.m.

Hi Ralph,
thanks for your answer. As far as I can see there's always a huge amount of Java libs to be used to access those APIs. This doesn't help, as my application that needs to connect to the API is node.js. Are these APIs also exposed as REST (or at least web) APIs somewhere?


Ralph Schoon commented Oct 18 '17, 2:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Then you will have to use REST/OSLC API's. You can search in this forum on https://open-services.net/ , stackoverflow or in Eclipse Lyo. I know some people had started to create a NodeJs framework for OSLC/REST.

I can only point to the examples I have and that are proven. Unfortunately, despite their popularity, I found the documentation and examples for OSLC/REST quite lacking. Which was one of the reasons why I have used the Java API where I have at least an SDK to find out how they are used.

Since REST/OSLC also tend to be used in dozens of frameworks I have seen very few chances for reuse.  So I can't help with that. Good luck.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.