API for Review Assistant

Discussion of open issues, suggestions and bugs regarding code review tool for Visual Studio – Review Assistant
Post Reply
kmd
Posts: 3
Joined: Tue 16 Apr 2013 13:45

API for Review Assistant

Post by kmd » Fri 26 Apr 2013 08:56

We want to receive email notifications every time when someone adds a review comment or changes the state of the review (accepted/rejected).

Is there an API for Review Assistant which we could use to write a utility which will achieve the above goal?

Of course, as we do have access the the database file of ReviewAssistant, we could extract the necessary information from there - but it would require some reverse engineering.

If there is no API available, could you at least provide me with the description of tables from ReviewAssistant database?

Artem
Devart Team
Posts: 137
Joined: Mon 21 Jun 2010 14:02

Re: API for Review Assistant

Post by Artem » Fri 26 Apr 2013 12:52

We are planning to add email notifications in a future version of Review Assistant. Unfortunately, Review Assistant has no public API now. You can create and describe your suggestion at our UserVoice

As to description of our database tables, their structure changes from version to version. In the last version you can use the following queries.

To get all reviews and their authors:

Code: Select all

SELECT r.RowId NumericId, r.Id ReviewID, r.Version, r.Title, u.FullName, u.Email FROM Reviews r
INNER JOIN Users u ON u.Id = r.AuthorId
WHERE r.Version > @Version or r.Id IN (
  SELECT ReviewId FROM Comments WHERE Version > @Version
)
To get all reviewers of a specified review:

Code: Select all

SELECT u.FullName, u.Email FROM Reviewers r
INNER JOIN Users u ON u.Id = r.UserId
WHERE r.ReviewId = @ReviewId
Note that Version is a field with continuous numbering, and its value is incremented on any change in the database. The Email field is currently unavailable for editing from the Review Assistant GUI, but it can contain values imported from Active Directory, and you can use it to determine which people should receive email notifications.

Post Reply