avsm/ocaml-github — pull request #14 by dsheets (2013-04-09 15:54:59+00:00)
Title: Rest of Pull Request API + Tests + Semantic Errors + Monadic Matching

Now Github.Pull.is_merged and Github.Pull.merge are implemented and (lightly) tested. Also, HTTP 422 (Unprocessable Entity) is which denotes a semantic API error is correctly recovered pending avsm/ocaml-cohttp#22. To implement is_merged, the response handling was abstracted and now, instead of expected_code and a response function, a list of response predicates and handler pairs is passed. A helper is supplied to create the expected_code predicate (code_handler). In this way, is_merged can branch on return code rather than erroring.

I also renamed Github.Issues to Github.Issue to be parallel with the other singular submodule names. It was conflicting with lib_test/issues.ml under module open ambiguity.