Skip to content

Releases: mirage/ocaml-github

Port to Jbuilder and split up opam packages

03 Jul 22:20
Compare
Choose a tag to compare

Port to Jbuilder (#202 by @rgrinberg @dsheets @samoht). This
splits up the opam packages into three separate ones:

  • github: the github_s, github_core, github_j and github_t modules.
  • github-unix: the Github and Github_cookie_jar modules.
  • github-jsoo: the js_of_ocaml Github_js module.

Tools that depended on github-unix previously will now need to
adjust their opam files to depend on the github-[unix|jsoo]
packages, and should also to rename github.unix to github-unix
and github.js to github-jsoo. However, transitional packages
are available for the older findlib names, so you only need to
immediately rename your opam files for the moment.

  • Minimum supported OCaml version is now 4.03.0 or higher.

Improvements to timeline events and add repo hooks

03 Jul 15:52
Compare
Choose a tag to compare
  • Changes marked with ! are type changes
  • ! repo_issue_event has changed the actor type to a linked_user option
    since GitHub sometimes returns a null response.
  • Fix various test cases that were not compiling due to API changes.
  • Add Issue.timeline_events
  • Add Organization.Hook
  • Expose Hook as Repo.Hook and deprecate Hook
  • Add Repo.Hook.parse_event_metadata
  • Add an optional media_type argument to API.get and API.get_stream

Repo.get_ref, caching features, and exception handling

10 Dec 13:24
Compare
Choose a tag to compare
  • Add Repo.get_ref (#175 from @samoht)
  • Add Endpoint.Version.t
  • Add Stream.since
  • Add Stream.version
  • Add Monad.catch
  • Add Monad.fail

Add push_event_hook_head_commit field

04 Nov 11:26
Compare
Choose a tag to compare

The push_event_hook_head_commit field has been added to web hook delivered push events.

Fix Issue.events label field

02 Oct 17:32
Compare
Choose a tag to compare

repo_issue_event_label and repo_issues_event_label have changed type from label option to base_label option as the GitHub APIs for Issue Events and Issue Labels are not consistent with the inclusion of the url field.

Fix Issue.remove_label

26 Sep 18:09
Compare
Choose a tag to compare

Issue.remove_label now returns a label list Response.t Monad.t like the other issue label modification functions because GitHub does not treat this DELETE endpoint like others and return 204 No Content. The GitHub docs are wrong on this point (a support ticket has been filed as they have now moved their developer API docs into a closed source repo). Because any previous user of the API would have immediately encountered this exception, this is a patch release.

Work-around a GitHub web hook bug

23 Sep 14:00
Compare
Choose a tag to compare

The web_hook_config_content_type field is now optional because GitHub does not appear to byte-wise validate the field and some web hook users (e.g. CircleCI) set a content-type field rather than a content_type field. This is a type-breaking change but all users of the type were already at risk of exceptional failure and so this type change is a bug fix.

More APIs, Improved Robustness

21 Sep 13:55
Compare
Choose a tag to compare

2.0 includes Labels API bindings by @dave-tucker (#146), Collaborators API bindings, and Emojis API bindings.

Many variant types were changed to add support for edit and delete events and most variants now have an Unknown of (string * json option) fall-back constructor to future-proof the library against variant extensions by GitHub.

@yallop contributed Organization.user_orgs and fixed Event.for_repo_issues which was then renamed to Issue.events_for_repo.

Issue.update became more flexible with the introduction of the update_issue type which allows each field to be optional.

tls was made the HTTPS dependency instead of ssl and atdgen >= 1.10.0 is now required for its <json untyped> support which is required for the above Unknown fall-back constructors.

HTTP redirect support was added which enables API requests against renamed or moved repositories. Up to 64 redirects are tolerated with each redirect (and whether it was temporary or permanent) available in the Response.t returned from most request-response endpoints.

GitHub error reporting has been improved for errors with type custom.

The Issue comment API was completed, individual combined Statuses are now queryable, and Repo.create and Repo.delete are bound.

Stream.fold was added.

CLI improvements, remove camlp4, more API coverage for status and contributions

26 Jul 17:09
Compare
Choose a tag to compare
  • Add new_status_context and status_context fields (#88)
  • Add setting the jar cookie by the GH_COOKIE env var (#100 by @rgrinberg)
  • Remove camlp4 as a build time dependency (#99, #104, #106 by @rgrinberg)
  • Add Windows tests via Appveyor (#98)
  • Add jar 'local' subcommand for printing local cookies (#111 by @rgrinberg)
  • Add Repo.contributor_stats for contributor statistics (#114 by @sevenEng)
  • Add stats_contributor type (#114 by @sevenEng)
  • Add stats_contributors type (#114 by @sevenEng)
  • Add contribution_week type
  • Fix Repo.get_tags_and_times exception when repository has no tags (#113)
  • Change Github_core.Make to accept an Env module making the library
    Mirage compatible by moving a Unix.getenv invocation into a parameter (#93)
  • Add contributor and contributors types (#112)
  • Add Repo.contributors to list contributors to a repository (#112)
  • Register automatically a Message exception printer (#116)
  • Fix git jar help strings to match the command reality.
  • Improve git jar create --help manual page.
  • Add git-gist create [--public] --descr <descr> <file1> <fileN> to
    upload new gists.

Stable LTS API

01 Jun 20:44
Compare
Choose a tag to compare

1.0.0 included many breaking changes and major new features. For a full list of changes, see the file CHANGES in the repository or distribution.

atdgen >=1.5.0 and yojson >=1.2.0 are now required for their tag_field support. cohttp >=0.17.0 is now required for its Link header support.

Many functions now return an 'a Response.t Monad.t instead of an 'a Monad.t. This is a future-proofing mechanism to enable progressive disclosure of API call metadata such as headers, redirects, endpoint polling, and so on.

Many functions now return a 'a Stream.t which lazily encapsulates a series of API requests when collections may be too large to fit into a single response (#46).

Two-factor authentication is now supported.

Monad.map, Monad.(>|=), and Monad.embed : 'a Lwt.t -> 'a Monad.t were added. Monad.(>>~) was added to bind and project an 'a Response.t Monad.t value.

git-jar save was removed after the Authorizations API response changes of 2015-04-20. git-jar make now requires a cookie name and defaults to that for the token note. git-jar revoke now accepts either a cookie name or a token ID. A git-jar token file permissions security vulnerability was fixed.

A Github.Message exception was added and is now raised when GitHub returns an API error. API.string_of_message was added for human consumption of those structured errors.

A number of rate limit query (Rate_limit) and caching (API.get_rate*) features were added.

The Search module was added in order to access GitHub's repository search API. The git-search jar command was added to expose this to users.

The Event module was added which gives users easy access to a variety of event sources. A new jar command, git-list-events, has been added to print events for a repo. A new test binary, parse_events, has been added which downloads and attempts to parse archived event data.

Several bugs with issue listing (#49, #53) were fixed and a new jar command, git-list-issues, was introduced.

A command line tool for gist manipulation was added.