mirage / ocaml-github

GitHub APIv3 OCaml bindings
ISC License
100 stars 61 forks source link

Support GitHub Enterprise #268

Open bn-d opened 1 year ago

bn-d commented 1 year ago

Currently the host and scheme is hard coded at

https://github.com/mirage/ocaml-github/blob/91edfae6f63d9990e030013b0397012b8cbc6843/lib/github_core.ml#L177

I would be great if we can add support for GitHub Enterprise Server.

i.e.

let authorize
  ?(scheme="https")
  ?(host="github.com")
  ...
  =
  ...
  Uri.make ~scheme ~host ~path:"login/oauth/access_token" ~query ()
tmcgilchrist commented 1 year ago

👍🏻 PRs very welcome to do this.

A good place to start would be extending Github_s.Env to include this information.