package gitlab-jsoo
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=8ca701f1adcc5e13b6591a82d6d4f55e44571523efeeb47e46777c1cd22e2f2a
sha512=8f3ed8892d7c8545bb7d9f3d9a8035daed3bd8a9a4e6dfe5a7c84258ee45ddc6123bc994afb18d8a012ceb4dc1bd3b96bd109ac5c7a43c96152e69cb690d1815
Description
This library provides an OCaml interface to the Gitlab APIv4 (JSON). This library installs the JavaScript version, which uses js_of_ocaml.
Published: 03 Feb 2022
README
Gitlab bindings for OCaml
Native OCaml bindings to Gitlab REST API v4.
The API coverage is incomplete (currently we support many of the Commit, Project, User and Event APIs) but if you find something missing please create an Issue or PR.
Pre-requisites
Plain opam / ocaml for building.
Configuration
Gitlab can be hosted in multiple places and configurations. By default the library uses the public gitlab.com
site with it's API endpoint of https://gitlab.com/api/v4
. This can be changed with:
GITLAB_URL # to configure the GitLab instance to connect to.
or programatically by overriding the Env
module.
Debugging
Two environment variables will cause more debugging to be output:
GITLAB_DEBUG=1 # API calls output to stderr
COHTTP_DEBUG=1 # even more HTTP-level debugging
If using the bindings from the toplevel, you can also set Gitlab.log_active
to true
to get the same effect as setting the GITLAB_DEBUG
environment variable.
Lab Cli
A command line client is provided called lab
in the style of a similarly named tool hub
for GitHub. From source you can run as:
dune exec -- lab <arguments>
If you opam install lab then the executable is available as lab
.
Run lab -h
for more information about cli options.
Tests
Running mdx tests for lab cli:
# Run integration tests against real gitlab instance
dune runtest --profile non-deterministic
# Promote any changes
dune runtest --profile non-deterministic --auto-promote
NOTE that ocaml-ci doesn't run these tests, any changes to the cli need to be validated manually.
Resources
Dependencies (6)
-
js_of_ocaml-lwt
>= "3.4.0"
-
cohttp-lwt-jsoo
>= "4.0"
-
cohttp
>= "4.0"
-
gitlab
= version
-
ocaml
>= "4.08.0"
-
dune
>= "2.9"
Dev Dependencies (1)
-
odoc
with-doc
Used by
None
Conflicts
None