BSD-3-Clause licensed by Rob Stewart
Maintained by [email protected]
This version can be pinned in stack with:gitlab-haskell-0.1.6@sha256:f53d5bb9a7311b054317d944d9d68b34f1e0ebd3da34a498c9b01fd749a65cb9,2782

A Haskell library for the GitLab web API

This library interacts with a GitLab server’s API. It supports queries about and updates to:

  • Branches
  • Commits
  • Groups
  • Issues
  • Jobs
  • Members
  • Merge requests
  • Pipelines
  • Projects
  • Repositories
  • Repository files
  • Users

The library parses JSON results into Haskell data types in the GitLab.Types module.

Example

Run all GitLab actions with runGitLab:

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

For example:

myProjects <-
  runGitLab
    (defaultGitLabServer
       { url = "https://gitlab.example.com"
       , token="my_token"} )
    (searchUser "joe" >>= userProjects . fromJust)

Which uses the` function:

searchUser   :: Text -> GitLab m (Maybe User)
userProjects :: User -> GitLab m (Maybe [Project])

This returns all GitLab TODO items, as Haskell values of type Todo for the user identified with the access tokenmy_token.

The gitlab-tools command line tool for bulk GitLab transactions uses this library link.