It's all about the answers!

Ask a question

How to get information about commits in SCM?


Leonardo Benevides (266628) | asked Dec 01 '20, 12:39 p.m.
Hi there!

Please, I would like to know if is there a way to get information about commits in SCM such as: WHO DID (the commit), WHEN and WHAT WAS DONE? We are planning to search all the code in our scm looking for this information.

One answer



permanent link
Shashikant Padur (4.3k27) | answered Dec 01 '20, 10:58 p.m.
JAZZ DEVELOPER

Look at the history of the component to get those details. Is this question about how to get the details using the API?


Comments
Leonardo Benevides commented Dec 02 '20, 7:24 a.m.
Thanks for your help.

We have a need to search all project areas that are using SCM, searching for those information. I think I have to use an API but I don't know which one. 

Shashikant Padur commented Dec 02 '20, 8:52 a.m. | edited Dec 02 '20, 8:53 a.m.
JAZZ DEVELOPER
You can get all the project areas using the following API:
ITeamRepository repo;
IProcessItemService itemService = (IProcessItemService)repo.getClientLibrary(IProcessItemService.class);
List<IProjectArea> projectAreas = itemService.findAllProjectAreas(IProcessClientService.ALL_PROPERTIES, null);

To get a list of team areas:
List<ITeamArea> teamAreas = repo.itemManager().fetchPartialItems(projectArea.getTeamAreas(), IItemManager.DEFAULT,
                    Collections.singletonList(ITeamArea.NAME_PROPERTY_ID), null);

To get the history of a component, look at this forum link:

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.