Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains the gerrit client library
Synopsis
- data GerritClient
- withClient :: Text -> Maybe Text -> (GerritClient -> IO ()) -> IO ()
- getVersion :: GerritClient -> IO GerritVersion
- queryChanges :: [GerritQuery] -> GerritClient -> IO [GerritChange]
- postReview :: GerritChange -> Text -> Text -> Int -> GerritClient -> IO ReviewResult
- newtype GerritVersion = GerritVersion Text
- data GerritQuery
- data GerritChange = GerritChange {}
- data GerritChangeStatus
- data ReviewResult = ReviewResult {}
- changeUrl :: GerritClient -> GerritChange -> Text
- hasLabel :: Text -> Int -> GerritChange -> Bool
Client
data GerritClient Source #
The GerritClient record, use withClient
to create
:: Text | The gerrit api url |
-> Maybe Text | A username (password is read from GERRIT_PASSWORD environment) |
-> (GerritClient -> IO ()) | The callback |
-> IO () | withClient performs the IO |
Create the GerritClient
Api
getVersion :: GerritClient -> IO GerritVersion Source #
Get the server version
queryChanges :: [GerritQuery] -> GerritClient -> IO [GerritChange] Source #
Search for changes
:: GerritChange | The change to review |
-> Text | A message |
-> Text | A label |
-> Int | A vote |
-> GerritClient | The client |
-> IO ReviewResult | Returns the ReviewResult |
Post a review
Main data types
newtype GerritVersion Source #
Instances
Show GerritVersion Source # | |
Defined in Gerrit.Data showsPrec :: Int -> GerritVersion -> ShowS # show :: GerritVersion -> String # showList :: [GerritVersion] -> ShowS # | |
Generic GerritVersion Source # | |
Defined in Gerrit.Data type Rep GerritVersion :: Type -> Type # from :: GerritVersion -> Rep GerritVersion x # to :: Rep GerritVersion x -> GerritVersion # | |
FromJSON GerritVersion Source # | |
Defined in Gerrit.Data parseJSON :: Value -> Parser GerritVersion # parseJSONList :: Value -> Parser [GerritVersion] # | |
type Rep GerritVersion Source # | |
Defined in Gerrit.Data type Rep GerritVersion = D1 ('MetaData "GerritVersion" "Gerrit.Data" "gerrit-0.0.0.0-HeaHw1VGRFr3asNCEgawPp" 'True) (C1 ('MetaCons "GerritVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
data GerritQuery Source #
data GerritChange Source #
Instances
data GerritChangeStatus Source #
Instances
data ReviewResult Source #
Instances
Convenient functions
changeUrl :: GerritClient -> GerritChange -> Text Source #
Return the url of a GerritChange