gitlab-haskell-0.1.3: A Haskell library for the GitLab web API

Copyright(c) Rob Stewart Heriot-Watt University 2019
LicenseBSD3
Maintainerrobstewart57@gmail.com
Stabilitystable
Safe HaskellNone
LanguageHaskell2010

GitLab

Description

 
Synopsis

Documentation

runGitLab :: (MonadUnliftIO m, MonadIO m) => GitLabServerConfig -> GitLab m a -> m a Source #

runs a GitLab action.

Internally, this creates a single Manager, whichs keeps track of open connections for keep-alive and which is shared between multiple threads and requests.

An example of its use is:

projectsWithIssuesEnabled :: IO [Project]
projectsWithIssuesEnabled =
  runGitLab myConfig $ filter (issueEnabled . issues_enabled) <$> allProjects
  where
    myConfig = defaultGitLabServer
        { url = "https://gitlab.example.com"
        , token = "my_access_token" }
    issueEnabled Nothing = False
    issueEnabled (Just b) = b