Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmcgilchrist/ocaml-gitlab
Native OCaml bindings to Gitlab REST API v4
https://github.com/tmcgilchrist/ocaml-gitlab
git gitlab ocaml
Last synced: about 2 months ago
JSON representation
Native OCaml bindings to Gitlab REST API v4
- Host: GitHub
- URL: https://github.com/tmcgilchrist/ocaml-gitlab
- Owner: tmcgilchrist
- License: bsd-3-clause
- Created: 2021-06-14T06:25:59.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-01T20:30:24.000Z (5 months ago)
- Last Synced: 2024-10-13T21:28:49.065Z (2 months ago)
- Topics: git, gitlab, ocaml
- Language: OCaml
- Homepage: https://tmcgilchrist.github.io/ocaml-gitlab/gitlab/
- Size: 1.13 MB
- Stars: 27
- Watchers: 7
- Forks: 8
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
Gitlab bindings for OCaml
==========
[![GitHub CI][github-shield]][github-ci] [![docs][docs-shield]][docs]
[![OCaml-CI Build Status][ocaml-ci-shield]][ocaml-ci]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 debuggingIf 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:``` shell
dune exec -- lab
```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:
``` shell
# 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.
[github-shield]: https://github.com/tmcgilchrist/ocaml-gitlab/actions/workflows/ci.yaml/badge.svg
[github-ci]: https://github.com/tmcgilchrist/ocaml-gitlab/actions/workflows/ci.yaml[docs-shield]:https://img.shields.io/badge/doc-online-blue.svg
[docs]: https://tmcgilchrist.github.io/ocaml-gitlab/gitlab/index.html[ocaml-ci]: https://ci.ocamllabs.io/github/tmcgilchrist/ocaml-gitlab
[ocaml-ci-shield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fci.ocamllabs.io%2Fbadge%2Ftmcgilchrist%2Focaml-gitlab%2Fmaster&logo=ocaml
[Gitlab REST API v4]: https://docs.gitlab.com/ee/api/README.htmlResources
----------[MDX Setup in RWO](https://github.com/realworldocaml/book/blob/master/Makefile#L14)