datakit-github

Abstraction of the GitHub API, suitable for DataKit clients
Library datakit-github
type t

The type for the webhook server state.

val v : token -> Uri.t -> t

v tok uri is the webhook server state configured to listen for incoming webhook events to the public address uri and using the token tok to perform GitHub API calls. The function f will be called everytime a new event is received.

val run : t -> unit Lwt.t

run t is a blocking lwt thread which runs the webook listener.

val repos : t -> Repo.Set.t

The list of watched repository.

val watch : t -> Repo.t -> unit Lwt.t

watch t r makes t watch the repo r.

val events : t -> Event.t list Lwt.t

events t is the list of events stored in t.

val wait : t -> unit Lwt.t

wait t waits for new events to be available.

val clear : t -> unit

clear t clears the list of events stored in t.