package current_gitlab

  1. Overview
  2. Docs

Access to the GitLab API.

type t

Configuration for accessing GitLab.

val webhook_secret : t -> string

Webhook secret to validate payloads from GitLab.

type refs

Reference information for the Repository.

module Status : sig ... end

Status associated with a single Commit.t.

module Commit : sig ... end

A specific Git commit.

module Repo : sig ... end

A Project's repository on GitLab.

module Ref : sig ... end

A Ref as an indirect way of referring to a commit.

module Ref_map : Stdlib.Map.S with type key = Ref.t
val head_commit : t -> Repo_id.t -> Commit.t Current.t

head_commit t repo evaluates to the commit at the head of the default branch in repo.

val ci_refs : ?staleness:Duration.t -> t -> Repo_id.t -> Commit.t list Current.t

ci_refs t repo evaluates to the list of branches and open PRs in repo.

  • parameter staleness

    If given, commits older than this are excluded. Note: the main branch commit is always included, even if stale.

refs t repo is the primitive for all the references in repo. This is the low-level API for getting the refs. It is used internally by ci_refs and head_of but in some cases you may want to use it directly, default_ref and all_refs will expose useful information for you. The result is cached (so calling it twice will return the same primitive).

val default_ref : refs -> Ref.t

default_ref refs will return the full name of the repository's default branch ref

val all_refs : refs -> Commit.t Ref_map.t

all_refs refs will return a map of all the repository's refs

module Anonymous : sig ... end

Perform Anonymous request to GitLab.

val cmdliner : t Cmdliner.Term.t

Command-line options to generate a GitLab configuration.

OCaml

Innovation. Community. Security.