package gitlab

  1. Overview
  2. Docs
GitLab APIv4 OCaml library

Install

Dune Dependency

Authors

Maintainers

Sources

lab-0.1.1.tbz
sha256=16289f1451df92b8fc5d54c2b7a05eb98062f40b7cd1318b8ec0705756721e87
sha512=aeb813f5d9347dedb9a4f80a01cc2d2d15828f84fbaec4a4804f3ca4fb9fa102ccb5ae5b4ff8620b13d5a57d1c0fab51bd61f3ed97945a25aa49f3e0e26d1319

README.md.html

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

MDX Setup in RWO

OCaml

Innovation. Community. Security.