gitlab-haskell

A Haskell library for the GitLab web API https://gitlab.com/robstewart57/gitlab-haskell

Version on this page:0.1.8
LTS Haskell 16.19:0.1.8
Stackage Nightly 2020-10-23:0.2.3
Latest on Hackage:0.2.3

See all snapshots gitlab-haskell appears in

BSD-3-Clause licensed by Rob Stewart

Module documentation for 0.1.8

This version can be pinned in stack with:gitlab-haskell-0.1.8@sha256:33e431921a10400eb31f4bf7c5a32ee7b3e17ca8111e1f899f1f0d859265a4a9,2778

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 functions:

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

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