locked
Creating code review request through API RRS feed

  • Question

  • We have an application that integrates with TFS for source control. In the past we have extended its capabilities to include work item association etc. We are looking into extending it with the code review capabilities of TFS 2012.

    So... is there (and if so where) a way to initiate a code review from the TFS API?

    Wednesday, March 27, 2013 7:49 PM

Answers

  • You can start a code review by creating a code review request work item (use the general WIT api to create this type of WIT). Start a code review through VS and look at the code review request work item that gets created to see how the fields need to be set.

    The actual comments on the code review use the discussion service:

    http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.discussion.client.aspx

    E.g. look at the DiscussionThread class for the API to start a code review discussion on a code review request.

    Ed.


    Ed Glas [MSFT]

    Wednesday, March 27, 2013 8:17 PM

All replies

  • You can start a code review by creating a code review request work item (use the general WIT api to create this type of WIT). Start a code review through VS and look at the code review request work item that gets created to see how the fields need to be set.

    The actual comments on the code review use the discussion service:

    http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.discussion.client.aspx

    E.g. look at the DiscussionThread class for the API to start a code review discussion on a code review request.

    Ed.


    Ed Glas [MSFT]

    Wednesday, March 27, 2013 8:17 PM
  • Aha, that's great input. I'll follow your suggestion and look at the fields needed to create a work item.

    I guess this is undocumented territory? :-)

    Wednesday, March 27, 2013 8:27 PM
  • Hi,

    Thank you for your response information.

    Hope you can mark useful reply as answer. It will be very beneficial for other community members having the similar questions.

    If anything is unclear, please free feel to let me know.

    Regards,


    Lily Wu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 28, 2013 10:36 AM
    Moderator
  • On the documentation comment, yeah I could not find any docs on creating a code review either. Discussion service is documented, but it is pretty minimal. Overall we didn't see many people targeting this via an API, which is why it was given a lower priority for documentation.


    Ed Glas [MSFT]

    Thursday, March 28, 2013 4:58 PM