Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Create reviews automatically

Help
2011-02-03
2013-04-26
  • Hi,
    Is it possible to automatically create reviews using svn post-commit hooks?

    Thanks / Jonas

     
  • Graham Pitt
    Graham Pitt
    2011-02-06

    Hi Jonas,

    Currently its not trivial to do this.  You can do it by doing the following from a post-commit hook:

    - From a mysql client update the review role table in the database to allow non-raising users to be the developer participant in a review:

    UPDATE review_role SET always_raiser = 0 WHERE id = 1;

    - Login to groogle via a http post command using wget to login.php (raising a review requires an actionee, who must be logged in!).  The following parameters must be set:

      username=a_username
      password=a_password

    The server will send back a session cookie and an authentication cookie.  You'll need this for the next step.

    - Raise the review by posting to request.php with the following request parameters:

    action=submit
    summary=Your review summary
    description=Your review descritpion
    resourcetype=1
    reviewtype=1
    svnresource=svn://server/path
    svnrevision=123
    Developer1=thedevelopersuserid
    Reviewer1=thereviewersuserid

    All being well you should get a review raised!

    Thanks,

    Graham