Module B0_github

module B0_github: sig .. end
GitHub interaction.


GitHub authentication


type auth 
The type for GitHub authentication.
val auth : user:string -> unit -> auth B0.result
auth ~user () determines a personal access token for user user. It first looks up the contents of the B0_GITHUB_TOKEN environment variable if that fails it looks up for an existing token in the $HOME/.github/b0-$USER.token file. If that fails instructions are printed on how to setup the token.

GitHub API requests


type content_type = string 
The type for content types.
type v3_body = [ `Empty | `Json of B0_json.G.t | `Other of content_type * string ] 
The type for GitHub V3 request bodies. Either JSON or something else tagged with its content type or nothing.
val req_json_v3 : ?headers:B0_http.headers ->
auth ->
path:string -> B0_http.meth -> v3_body -> B0_json.t B0.result
req_json_v3 auth path m ~headers body performs the request for json on path using method m, additional headers headers, body body and authentication auth.
val query_v4 : auth -> string -> B0_json.t B0.result
query_v4 auth q performs the the GitHub GraphQL V4 query q using authentication auth.

Higher-level interface


module Repo: sig .. end
GitHub repositories.
module Issue: sig .. end
Repository issues.
module Release: sig .. end
Repository releases.