package github

  1. Overview
  2. Docs

The Hook module provides access to GitHub's webhooks API which lets you manage a repository's post-receive hooks.

val for_repo : ?token:Token.t -> user:string -> repo:string -> unit -> Github_t.hook Stream.t

for_repo ~user ~repo () is a stream of hooks for repo user/repo.

val get : ?token:Token.t -> user:string -> repo:string -> id:int64 -> unit -> Github_t.hook Response.t Monad.t

get ~user ~repo ~id () is hook id for repo user/repo.

val create : ?token:Token.t -> user:string -> repo:string -> hook:Github_t.new_hook -> unit -> Github_t.hook Response.t Monad.t

create ~user ~repo ~hook () is a newly created post-receive hook for repo user/repo as described by hook.

val update : ?token:Token.t -> user:string -> repo:string -> id:int64 -> hook:Github_t.update_hook -> unit -> Github_t.hook Response.t Monad.t

update ~user ~repo ~id ~hook () is the updated hook id in user/repo as described by hook.

val delete : ?token:Token.t -> user:string -> repo:string -> id:int64 -> unit -> unit Response.t Monad.t

delete ~user ~repo ~id () activates after hook id in repo user/repo has been deleted.

val test : ?token:Token.t -> user:string -> repo:string -> id:int64 -> unit -> unit Response.t Monad.t

test ~user ~repo ~id () activates after a push event for the lastest push to user/repo has been synthesized and sent to hook id.

OCaml

Innovation. Community. Security.