Module B0_github
GitHub interaction.
GitHub authentication
val auth : user:string -> unit -> (auth, string) Stdlib.resultauth ~http ~user ()determines a personal access token for useruser. It first looks up the contents of theB0_GITHUB_TOKENenvironment variable if that fails it looks up for an existing token in theOs.Dir.config() /github/b0-$USER.tokenfile. If that fails instructions are printed on how to setup the token.
GitHub API requests
type v3_body=[|`Json of B0_web.Jsong.t|`Other of content_type * string|`Empty]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_web.Http.headers -> B0_web.Http.t -> auth -> path:string -> B0_web.Http.meth -> v3_body -> (B0_web.Json.t, string) Stdlib.resultreq_json_v3 auth path m ~headers bodyperforms the request for json onpathusing methodm, additional headersheaders, bodybodyand authenticationauth.
val query_v4 : B0_web.Http.t -> auth -> string -> (B0_web.Json.t, string) Stdlib.resultquery_v4 auth qperforms the the GitHub GraphQL V4 queryqusing authenticationauth.
Higher-level interface
module Repo : sig ... endGitHub repositories.
module Issue : sig ... endRepository issues.
module Release : sig ... endRepository releases.
module Pages : sig ... endPublish to GitHub pages.