Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Code Review Findings, Approvals using Java APIs

Hello Team,

Usecase:
We want to get overview of how many code review findings raised, how many are resolved, is there any pending approvals,which stream it is delivered,for snapshot.

Which then will be executed by Release engineer to make sure Code Review Coverage for Snapshot.

Note: We are using Code Review Tool for Code Review.

Could you please let us know how this can be achieved using Java Client Libraries.

Thanks

0 votes


Accepted answer

Permanent link
The easiest way to get information on Code Review (the number of issues and their states) run the 'export code-review' CLI command. This can generate a full XML or JSON report which you can then parse as you wish.


Example:

To write output to a JSON file for code review work items that result from a work item query, create a work item query that displays the work items that you want the code review data for and use the work item query ID in the export code-review command. For example, in work item query https://example:9443/ccm/web/projects/#action=com.ibm.team.workitem.runSavedQuery&id=_UU6RMMqrEeWW1pjuq1MlnQ, the query ID is _UU6RMMqrEeWW1pjuq1MlnQ.

Use the query ID in the command to export the work items to the file. For example:

scm export code-review -r kg --json _UU6RMMqrEeWW1pjuq1MlnQ queryResult.json

The output is written to queryResult.json.


Otherwise, in terms of Java API, see ICodeReviewService

Ralph Schoon selected this answer as the correct answer

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,964
× 1,381

Question asked: Nov 16 '17, 2:19 a.m.

Question was seen: 1,896 times

Last updated: Jan 25 '19, 10:16 a.m.

Confirmation Cancel Confirm