package github
Module Repo.HookSource
The Hook module provides access to GitHub's webhooks API which lets you manage a repository's post-receive hooks.
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.tget ~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.tcreate ~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.tupdate ~user ~repo ~id ~hook () is the updated hook id in repo user/repo as described by hook.
val delete :
?token:Token.t ->
user:string ->
repo:string ->
id:int64 ->
unit ->
unit Response.t Monad.tdelete ~user ~repo ~id () activates after hook id in repo user/repo has been deleted.
val ping :
?token:Token.t ->
user:string ->
repo:string ->
id:int64 ->
unit ->
unit Response.t Monad.tping ~user ~repo ~id () trigger a ping event to be sent to the hook id in repo user/repo.
val test :
?token:Token.t ->
user:string ->
repo:string ->
id:int64 ->
unit ->
unit Response.t Monad.ttest ~user ~repo ~id () activates after a push event for the lastest push to user/repo has been synthesized and sent to hook id.
parse_event ~constr ~payload () is the event with constructor constr that is represented by payload.
parse_event_metadata ~payload () is the event metadata for the serialized event payload.