-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update from Hackage at 2021-01-15T23:04:33Z
- Loading branch information
1 parent
46f330d
commit ef5d068
Showing
2 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
cabal-version: 2.4 | ||
name: gitlab-haskell | ||
category: Git | ||
version: 0.2.5 | ||
synopsis: A Haskell library for the GitLab web API | ||
description: | ||
This Haskell library queries and updates the database of a GitLab instance using the GitLab web API: <https://docs.gitlab.com/ee/api/> | ||
. | ||
It also features an 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]) | ||
> projectCommits :: Project -> GitLab [Commit] | ||
. | ||
This library can also be used to develop rule based GitLab file hooks that react in real time to GitLab events with: | ||
. | ||
> 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> | ||
|
||
|
||
homepage: https://gitlab.com/robstewart57/gitlab-haskell | ||
bug-reports: https://gitlab.com/robstewart57/gitlab-haskell/issues | ||
author: Rob Stewart | ||
maintainer: robstewart57@gmail.com | ||
copyright: 2020 Rob Stewart, Heriot-Watt University | ||
license: BSD-3-Clause | ||
license-file: LICENSE | ||
data-files: data/system-hooks/*.json | ||
build-type: Simple | ||
extra-source-files: | ||
README.md | ||
|
||
source-repository head | ||
type: git | ||
location: https://gitlab.com/robstewart57/gitlab-haskell | ||
|
||
library | ||
exposed-modules: | ||
GitLab | ||
, GitLab.Types | ||
, GitLab.API.Groups | ||
, GitLab.API.Members | ||
, GitLab.API.Commits | ||
, GitLab.API.Projects | ||
, GitLab.API.Users | ||
, GitLab.API.Issues | ||
, GitLab.API.Pipelines | ||
, GitLab.API.Branches | ||
, GitLab.API.Jobs | ||
, GitLab.API.Repositories | ||
, GitLab.API.MergeRequests | ||
, GitLab.API.RepositoryFiles | ||
, GitLab.API.Todos | ||
, GitLab.API.Version | ||
, GitLab.API.Notes | ||
, GitLab.SystemHooks.Types | ||
, GitLab.SystemHooks.GitLabSystemHooks | ||
, GitLab.SystemHooks.Rules | ||
other-modules: | ||
GitLab.WebRequests.GitLabWebCalls | ||
hs-source-dirs: | ||
src | ||
build-depends: | ||
base >=4.7 && <5 | ||
, http-conduit | ||
, connection | ||
, aeson >= 1.4.4.0 | ||
, bytestring | ||
, text | ||
, http-types | ||
, transformers | ||
, unliftio | ||
, unliftio-core | ||
, time | ||
, temporary | ||
, unix | ||
default-language: Haskell2010 | ||
ghc-options: -Wall | ||
-- the following two for the stan static analysis tool | ||
-- -fwrite-ide-info | ||
-- -hiedir=.hie | ||
|
||
test-suite test-gitlab-haskell | ||
type: exitcode-stdio-1.0 | ||
main-is: Tests.hs | ||
other-modules: SystemHookTests | ||
hs-source-dirs: tests/ | ||
default-language: Haskell2010 | ||
build-depends: base >= 4.8.0.0 && < 6 | ||
, tasty | ||
, tasty-hunit | ||
, gitlab-haskell | ||
, bytestring | ||
, aeson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"package-hashes":{"MD5":"c4c41f45445fd9d7e410325182511b8f","Skein512_512":"99de5ef3d5fe648077129bd6f3990a3d1d8b9ad1d1365274b14a00ff707542edf5e3b288b95ab1e9ad519864311f6631b96d22e9a6b6ab5aa59c3c76a2a10e2f","SHA1":"b11718948bfc696d67babd728ec35ec0a452e4a4","SHA512":"c8984979439b0c53f18eb18638b987291e28b109559e1210c78bc8705cc7d1185ee03e86ad5bab4139b6d14398512b38e12c3e7c42f24c9408570ff26c921c94","SHA256":"7d20ef80adc33843ec9c6052e2444f0ab8be2ea524bceb65a7b76e0a055db48d"},"package-locations":["https://hackage.haskell.org/package/gitlab-haskell-0.2.5/gitlab-haskell-0.2.5.tar.gz","https://s3.amazonaws.com/hackage.fpcomplete.com/package/gitlab-haskell-0.2.5.tar.gz"],"package-size":36085} |