API to get the details of a person who commit code to RTC
Hello,
How can i get the details like name/usrid, email address of a person who committed code to RTC. is there any command to get these details..? or any API's? Thanks & Regards Shruti |
One answer
Hi,
The following method "may" work., I haven't tested personally. Please do let me know if this works.. public void printModifiedByInRepositoryWorkspace( ITeamRepository repository, IProgressMonitor monitor) throws TeamRepositoryException, ItemNotFoundException { IWorkspaceManager iWorkspaceManager = SCMPlatform .getWorkspaceManager(repository); int maxSize = 4; monitor.subTask("Printing MODIFIED BY IN workspace"); IWorkspaceSearchCriteria criteria = IWorkspaceSearchCriteria.FACTORY .newInstance(); criteria.setExactName("rtcWorkspace"); criteria.setKind(IWorkspaceSearchCriteria.WORKSPACES); java.util.List<IWorkspaceHandle> workspaceList = iWorkspaceManager .findWorkspaces(criteria, maxSize, monitor); System.out.println("found " + workspaceList.size() + " matching workspaces"); for (IWorkspaceHandle iWorkspaceHandle : workspaceList) { IWorkspace iWorkspace = (IWorkspace) repository.itemManager() .fetchCompleteItem(iWorkspaceHandle, IItemManager.DEFAULT, monitor); IContributorHandle iContributorHandle = iWorkspace.getModifiedBy(); IContributor iContributor = (IContributor) repository.itemManager() .fetchCompleteItem(iContributorHandle, IItemManager.DEFAULT, monitor); System.out.println(iContributor.getName() + "\t" + iContributor.getUserId() + "\t" + iContributor.getEmailAddress()); } } Comments
shruti gudagur
commented Jun 05 '14, 2:25 a.m.
Hello Ajay,
Ajay Mallikarjunaiah
commented Jun 05 '14, 2:30 a.m.
Hi..,
shruti gudagur
commented Jun 05 '14, 4:50 a.m.
Hello Ajay,
|
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.