gitlab-haskell: A Haskell library for the GitLab web API
This library lifts the GitLab REST API into Haskell: https://docs.gitlab.com/ee/api/
It also features an event driven reactive API for writing Gitlab file hook applications
Run all GitLab actions with runGitLab
:
runGitLab :: => GitLabServerConfig -- ^ the GitLab server details -> GitLab a -- ^ the GitLab action -> IO 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 (Maybe User) userProjects :: User -> GitLab (Maybe [Project])
This is the API to develop event driven rule based GitLab file hooks that fire in real-time on events on a GitLab server:
receive :: [Rule] -> GitLab ()
class (FromJSON a) => SystemHook a where match :: String -> (a -> GitLab ()) -> Rule matchIf :: String -> (a -> GitLab Bool) -> (a -> GitLab ()) -> Rule
For more details about the file hooks support: https://www.macs.hw.ac.uk/~rs46/posts/2020-06-06-gitlab-system-hooks.html
Unsurprisingly, this library is maintained on GitLab: https://gitlab.com/robstewart57/gitlab-haskell
[Skip to Readme]
Modules
- GitLab
- API
- GitLab.API.Boards
- GitLab.API.Branches
- GitLab.API.Commits
- GitLab.API.Discussions
- GitLab.API.Groups
- GitLab.API.Issues
- GitLab.API.Jobs
- GitLab.API.Members
- GitLab.API.MergeRequests
- GitLab.API.Notes
- GitLab.API.Pipelines
- GitLab.API.Projects
- GitLab.API.Repositories
- GitLab.API.RepositoryFiles
- GitLab.API.Tags
- GitLab.API.Todos
- GitLab.API.Users
- GitLab.API.Version
- SystemHooks
- GitLab.SystemHooks.GitLabSystemHooks
- GitLab.SystemHooks.Rules
- GitLab.SystemHooks.Types
- GitLab.Types
- API
Downloads
- gitlab-haskell-1.0.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates