Hi,

This is definitely doable. The diff viewer actually uses the API for posting
comments and reviews.

The docs are in need of a full rewrite (slowly getting there), but you can
sort of see an example of how to do this at:

http://github.com/reviewboard/reviewboard/blob/master/reviewboard/htdocs/media/rb/js/datastore.js

Here, we create a DiffComment with the right attributes and call save().
This in turn calls the right API call to the right URL. You can see how the
URL is formed in _getURL.

So, essentially, you'll do an HTTP POST to
/api/json/reviewrequests/<reviewrequest_id>/diff/<revision>/file/<filediff_id>/line/<linenum>/comments/.

The post body will contain three fields: action, num_lines, and text.

action should be "set". num_lines should contain the number of lines the
comment spans (1 or more), and text should be the comment text (plain text,
not HTML).

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Thu, Nov 12, 2009 at 12:01 PM, talkaboutquality <t.har...@ieee.org>wrote:

>
> Review Board looks great, and we're considering deploying it for our
> project, but I would like to be able to submit comments from outside
> Review Board / web -- programmatically from an IDE plug-in (that I
> would write) which knows the filename, line number, and text of a
> single review comment on that line of code. Assuming that the file and
> line are part of a diff that's already in Review Board for review,
> what is the Review Board API to submit a comment on an existing
> review?
>
> (I did search a bit here but didn't see this question or answer, so
> I'm asking.)
>
> Thanks!
>
> Tom
>
> > To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>

--~--~---------~--~----~------------~-------~--~----~
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to