Re: Create new review remote API
On Fri, Jun 12, 2009 at 19:11, Christophernadiasver...@gmail.com wrote: I am doing a check of reviewboard, and so far it is really nice. I was wondering if there is a SOAP or AJAX or REST API for creating new review requests. Here the function we use : def new_request(self, repo_path, changenum=None, submit_as=None): Creates a review request on a Review Board server, updating an existing one if the changeset number already exists. try: debug(Attempting to create review request for %s % repo_path) data = { 'repository_path': repo_path } if changenum: data['changenum'] = changenum if submit_as: debug(Submitting the review request as %s % submit_as) data['submit_as'] = submit_as rsp = self.api_post('api/json/reviewrequests/new/', data) except APIError, e: rsp, = e.args If someone had guidance on how to do the reviewboard side of this, I would appreciate it. We develop an CLI app with Hg and Reviewboard. Alpha stage but useful to understand interaction with RB. -- Sebastien Douche sdou...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Create new review remote API
On Fri June 12 2009 19:11:15 Christopher wrote: hg requestreview -m Made some great new changes to component Foo For Mercurial, you can evaluate this HG extension: http://freehg.org/u/roccoblues/mercurial-reviewboard/ Regards. Gilles. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Create new review remote API
Hi Christopher, Much of Review Board's functionality is available through a JSON API. It's not well documented yet, but if you look at reviewboard/webapi/urls.py and reviewboard/webapi/json.py, you'll see the current command set. In this case, you'll do a POST to /webapi/json/reviewrequests/new/ with some data. See new_review_request in webapi/json.py for optional and required parameters. I'd like to flesh this out this API in a future release, as well as provide a Python API for integrating with Review Board servers, but for now it should provide what you want. However, I would like to strongly recommend you look into just using post-review for this. It does basically what you want and any new support should go into it directly. See http://www.review-board.org/docs/manual/dev/users/tools/post-review/ for usage. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.review-board.org VMware, Inc. - http://www.vmware.com On Fri, Jun 12, 2009 at 10:11 AM, Christopher nadiasver...@gmail.comwrote: I am doing a check of reviewboard, and so far it is really nice. I was wondering if there is a SOAP or AJAX or REST API for creating new review requests. Basically what I want to do is create an extension for mercurial that works like this: hg requestreview -m Made some great new changes to component Foo And that performs a diff, saves the output, and then makes some call like: req_id = reviewboardclient.CreateRequestReview(summary, diff) Finally, it launches the user's browser to the URL that shows the request so that they can fill in any additional information and publish. If someone had guidance on how to do the reviewboard side of this, I would appreciate it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups reviewboard group. To post to this group, send email to reviewboard@googlegroups.com 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 -~--~~~~--~~--~--~---