Skip to content

Commit

Permalink
Extra json serialisation tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgilchrist committed Feb 3, 2022
1 parent 5580100 commit 7d1e8a0
Show file tree
Hide file tree
Showing 10 changed files with 1,444 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 0.1.2 - 2022-02-02

## Added

- Revert using int64 types in gitlab.atd (#38 @tmcgilchrist)

# 0.1.1 - 2022-01-14
Expand Down
7 changes: 4 additions & 3 deletions cli/lab.ml
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,14 @@ let ci_status_set_cmd config =
$ CommandLine.state $ pure ()),
Term.info "set-ci-status - Set or update the build status of a commit" )

let api_cmd =
let api_cmd config =
let api uri_str () =
let cmd =
let open Gitlab in
let open Monad in
let config = config () in
let uri = Uri.of_string uri_str in
API.get ~uri (fun body -> Lwt.return (Yojson.Basic.from_string body))
API.get ~token:config.token ~uri (fun body -> Lwt.return (Yojson.Basic.from_string body))
>|~ fun json -> printf "%s" (Yojson.Basic.pretty_to_string json)
in
Lwt_main.run @@ Gitlab.Monad.run cmd
Expand Down Expand Up @@ -311,7 +312,7 @@ let cmds =
user_cmd;
user_name_cmd;
user_projects_cmd;
api_cmd;
api_cmd config;
merge_requests_cmd config;
status_checks_cmd config;
user_events_cmd config;
Expand Down
2 changes: 1 addition & 1 deletion lib/gitlab_s.mli
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ module type Gitlab = sig
*)

val current_user : token:Token.t -> unit -> Gitlab_t.user Response.t Monad.t
(** [current_user ~token ()] is the current user for [token].
(** [current_user ~token ()] is the current user for [token].
See {{:https://docs.gitlab.com/ee/api/users.html#list-current-user-for-normal-users}Current Authenticated User.}
*)

Expand Down
Loading

0 comments on commit 7d1e8a0

Please sign in to comment.