Job Targets

type t = [
  1. | `PR of
  2. | `Ref of

The type for computation targets. A target can either be a pull-request ID, e.g. a GitHub repository and a number; or a reference ID, e.g. a GitHub repository and a reference name (given as a list of string, e.g. "heads/master" should be split into ["heads"]; ["master"]).

val compare : t -> t -> int

compare is the comparison function for GitHub targets.

val repo : t -> Datakit_github.Repo.t

repo t is t's repository.

val id : t -> [ `PR of int | `Ref of string list ]

id t is t's ID, e.g either a pull-request number or a reference name split on '/'.

val pp : t Fmt.t

pp is the pretty-printer for GitHub targets.

type v = [
  1. | `PR of Datakit_github.PR.t
  2. | `Ref of Datakit_github.Ref.t

The type for resolved GitHub targets. Resolved pull-request and references contains the head commit and other metadata (see Datakit_github's documentation for more details).

head v is the head commit of v.

val compare_v : v -> v -> int

compare_v compares values of type v.

val repo_v : v -> Datakit_github.Repo.t

repo_v v is v's repository.

val pp_v : v Fmt.t

pp_v is the pretty-printer for resolved GitHub targets.