package github

  1. Overview
  2. Docs

The Repo module offers the functionality of GitHub's repository API.

val info : ?token:Token.t -> user:string -> repo:string -> unit -> Github_t.repository Response.t Monad.t

info ~user ~repo () is a description of repository user/repo.

val fork : ?token:Token.t -> ?organization:string -> user:string -> repo:string -> unit -> Github_t.repository Response.t Monad.t

fork ?organization ~user ~repo () is a newly forked repository from user/repo to the current token's user or organization if it's provided.

val forks : ?token:Token.t -> ?sort:Filter.forks_sort -> user:string -> repo:string -> unit -> Github_t.repository Stream.t

forks ?sort ~user ~repo () is a stream of all repositories forked from user/repo sorted by ?sort (default `Newest).

val get_tag : ?token:Token.t -> user:string -> repo:string -> sha:string -> unit -> Github_t.tag Response.t Monad.t

get_tag ~user ~repo ~sha () is the annotated tag object with SHA sha in user/repo.

val tags : ?token:Token.t -> user:string -> repo:string -> unit -> Github_t.repo_tag Stream.t

tags ~user ~repo () is a stream of all tags in repo user/repo.

val get_tags_and_times : ?token:Token.t -> user:string -> repo:string -> unit -> (string * string) Stream.t

get_tags_and_times ~user ~repo () is a stream of pairs of tag names and creation times for all lightweight and annotated tags in user/repo.

val branches : ?token:Token.t -> user:string -> repo:string -> unit -> Github_t.repo_branch Stream.t

branches ~user ~repo () is a stream of all branches in repo user/repo.

val refs : ?token:Token.t -> ?ty:string -> user:string -> repo:string -> unit -> Github_t.git_ref Stream.t

refs ?ty ~user ~repo () is a stream of all git references with prefix ?ty for repo user/repo.

val get_commit : ?token:Token.t -> user:string -> repo:string -> sha:string -> unit -> Github_t.commit Response.t Monad.t

get_commit ~user ~repo ~sha () is commit sha in user/repo.

OCaml

Innovation. Community. Security.