Github.Repo
The Repo
module offers the functionality of GitHub's repository API.
val create : ?token:Token.t -> ?organization:string -> repo:Github_t.new_repo -> unit -> Github_t.repository Response.t Monad.t
create ?organization new_repo ()
is a new repository owned by the user or organizations if it's provided.
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_ref : ?token:Token.t -> user:string -> repo:string -> name:string -> unit -> Github_t.git_ref Response.t Monad.t
get_ref ~user ~repo ~name
is the git reference with name name
for repo user
/repo
.
val get_commits : ?token:Token.t -> user:string -> repo:string -> unit -> Github_t.commit Stream.t
get_commits ~user ~repo ()
stream of all commits in 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
.
val contributors : ?token:Token.t -> user:string -> repo:string -> unit -> Github_t.contributor Stream.t
contributors ~user ~repo ()
is a stream of contributors to repo user
/repo
.
val delete : ?token:Token.t -> user:string -> repo:string -> unit -> unit Response.t Monad.t
delete ~user ~repo ()
activates after repo user
/repo
has been deleted.
module Hook : sig ... end
The Hook
module provides access to GitHub's webhooks API which lets you manage a repository's post-receive hooks.