package gitlab-jsoo

  1. Overview
  2. Docs
Gitlab APIv4 OCaml library

Install

Dune Dependency

Authors

Maintainers

Sources

lab-0.1.0.tbz
sha256=fb8efa6f650fcfed8b0e16054f53d6cec624bf218e76e4e5264e16c1d4a37f8d
sha512=341bd366a6c664067a043a2e75f9f6db479a43ae8f4e6448a5ba80b6e9269a40b95b307e4de538c60d2cfabc82c964113da789f04d22b2e13456234344e75089

Description

This library provides an OCaml interface to the Gitlab APIv4 (JSON). This library installs the JavaScript version, which uses js_of_ocaml.

Published: 29 Nov 2021

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.

  • jd for diffing json (github.com/josephburnett/jd) in tests

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.

Dependencies (6)

  1. js_of_ocaml-lwt >= "3.4.0"
  2. cohttp-lwt-jsoo >= "4.0"
  3. cohttp >= "4.0"
  4. gitlab = version
  5. ocaml >= "4.08.0"
  6. dune >= "2.9"

Dev Dependencies (2)

  1. odoc with-doc
  2. mdx with-test

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.