|
ReviewBoard.Api | Portability | portable | Stability | experimental | Maintainer | adam.smyczek@gmail.com |
|
|
|
|
|
Description |
ReviewBoard API
This module provides the basic ReviewBoard API calls.
All calls are executed inside the RBAction monad that represents
a session to the ReviewBoard server. A login to the server is performed
in the RBAction run method runRBAction.
All actions return the RBResponse object that can be a RBok with
the response JSValue or RBerr containing the error message and
the encoded response, if received. Errors are handled in
two ways:
- Network errors, for example connection errors throw an exception.
- Response errors resulting in for example invalid request parameters are
handled using the rbErrHandler (by default print to stdin).
For API details see ReviewBoard project page http://code.google.com/p/reviewboard/
|
|
Synopsis |
|
|
|
Documentation |
|
module ReviewBoard.Core |
|
module ReviewBoard.Browser |
|
module ReviewBoard.Request |
|
API calls
|
|
Users and groups
|
|
|
Search for a user or list all users if user is Nothing
|
|
|
Search for a group or list all group if Nothing
|
|
|
Star group for group name
|
|
|
Unstar group for group name
|
|
Review request
|
|
|
Get review request by id.
|
|
|
Get review request by repository id and changenum id
|
|
|
Create new review request using the provided repository path and an optional
submit_as user. The returned response contains the id of the new created
review request that can be accessed using rrId helper function.
|
|
|
Delete review request with request id.
|
|
|
Set fields to review request draft with id.
|
|
|
Set one field for review request draft with id.
|
|
|
Discard review request draft for id.
|
|
|
Save review request draft whith id.
|
|
|
Star review request for id
|
|
|
Star review request for id
|
|
|
Add a new diff to a review request with id, file path and the basedir parameter.
|
|
|
Add a new screenshot with file path to a review request with id
|
|
|
List all review requests with an optional status
|
|
|
List review request assigned to a group with an optional status
|
|
|
List review request assigned to a user, directly or not with an optional status
|
|
|
List review request from a user with an optional status
|
|
Review
|
|
|
List all reviews for review request id
|
|
|
Save review draft for review request id
|
|
|
Delete review draft for review request id
|
|
|
Publish review request draft for id
|
|
Others
|
|
|
List repositories
|
|
Util functions
|
|
|
Execute a ReviewBoard action using the provided URL, user
and password.
|
|
Example
|
|
The following RBAction creates a new review request draft, sets some fields
and uploads a diff file:
import ReviewBoard.Api
import qualified ReviewBoard.Response as R
newRRAction :: RBAction ()
newRRAction = do
rsp <- reviewRequestNew "repository" Nothing
case rsp of
RBok r -> do
let id = R.id . R.review_request $ r
reviewRequestsSetField id TARGET_PEOPLE "reviewers"
reviewRequestsSetField id DESCRIPTION "Request description"
reviewRequestsDiffNew id "basedir" "diffFileName"
reviewRequestSaveDraft id
liftIO $ print "Done."
RBerr s -> throwError s
To run this action, execute:
execRBAction "url" "user" "password" newRRAction
|
|
Produced by Haddock version 2.3.0 |