Skip to content

Commit 0c0f32a

Browse files
committed
sync ocamlformat
1 parent 6d3d5d9 commit 0c0f32a

File tree

14 files changed

+3
-37
lines changed

14 files changed

+3
-37
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- run: opam install . --deps-only --with-doc --with-test
3737

38-
- run: opam install ocamlformat.0.19.0
38+
- run: opam install ocamlformat.0.20.1
3939

4040
- name: compile
4141
run: opam exec -- make

.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#version=0.19.0
1+
version=0.20.1
22
break-cases=toplevel
33
break-infix-before-func=false
44
break-infix=fit-or-vertical

lib/action.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ open Github_j
88
exception Action_error of string
99

1010
let action_error msg = raise (Action_error msg)
11-
1211
let log = Log.from "action"
1312

1413
module Action (Github_api : Api.Github) (Slack_api : Api.Slack) = struct

lib/api.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ open Slack_t
44

55
module type Github = sig
66
val get_config : ctx:Context.t -> repo:repository -> (Config_t.config, string) Result.t Lwt.t
7-
87
val get_api_commit : ctx:Context.t -> repo:repository -> sha:string -> (api_commit, string) Result.t Lwt.t
9-
108
val get_pull_request : ctx:Context.t -> repo:repository -> number:int -> (pull_request, string) Result.t Lwt.t
11-
129
val get_issue : ctx:Context.t -> repo:repository -> number:int -> (issue, string) Result.t Lwt.t
1310

1411
val request_reviewers
@@ -21,8 +18,6 @@ end
2118

2219
module type Slack = sig
2320
val send_notification : ctx:Context.t -> msg:post_message_req -> unit slack_response Lwt.t
24-
2521
val send_chat_unfurl : ctx:Context.t -> chat_unfurl_req -> unit slack_response Lwt.t
26-
2722
val send_auth_test : ctx:Context.t -> unit -> auth_test_res slack_response Lwt.t
2823
end

lib/api_local.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ open Common
33
open Devkit
44

55
let cwd = Caml.Sys.getcwd ()
6-
76
let cache_dir = Caml.Filename.concat cwd "github-api-cache"
87

98
module Github : Api.Github = struct
@@ -20,17 +19,13 @@ module Github : Api.Github = struct
2019
| Ok file -> Lwt.return @@ Ok (Github_j.api_commit_of_string file)
2120

2221
let get_pull_request ~ctx:_ ~repo:_ ~number:_ = Lwt.return @@ Error "undefined for local setup"
23-
2422
let get_issue ~ctx:_ ~repo:_ ~number:_ = Lwt.return @@ Error "undefined for local setup"
25-
2623
let request_reviewers ~ctx:_ ~repo:_ ~number:_ ~reviewers:_ = Lwt.return @@ Error "undefined for local setup"
2724
end
2825

2926
module Slack_base : Api.Slack = struct
3027
let send_notification ~ctx:_ ~msg:_ = Lwt.return @@ Error "undefined for local setup"
31-
3228
let send_chat_unfurl ~ctx:_ _ = Lwt.return @@ Error "undefined for local setup"
33-
3429
let send_auth_test ~ctx:_ () = Lwt.return @@ Error "undefined for local setup"
3530
end
3631

lib/api_remote.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ end
7878

7979
module Slack : Api.Slack = struct
8080
let log = Log.from "slack"
81-
8281
let query_error_msg url e = sprintf "error while querying %s: %s" url e
8382

8483
let slack_api_request ?headers ?body meth url read =

lib/atd_adapters.ml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ module List_or_default_field = struct
4040
end
4141

4242
module Branch_filters_adapter = List_or_default_field.Make (struct
43-
let field_name = "branch_filters"
44-
45-
let default_alias = "any"
46-
47-
let default_value = `List []
43+
let field_name = "branch_filters" let default_alias = "any" let default_value = `List []
4844
end)
4945

5046
(** Error detection in Slack API response. The web API communicates errors using

lib/colors.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
(* https://styleguide.github.com/primer/utilities/colors/#background-colors *)
22

33
let gray = "#f6f8fa"
4-
54
let blue = "#0366d6"
6-
75
let yellow = "#ffd33d"
8-
96
let red = "#d73a49"
10-
117
let green = "#28a745"
12-
138
let purple = "#6f42c1"

lib/common.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,16 @@ module StringMap = struct
55
type 'a t = 'a Map.M(String).t
66

77
let empty : 'a t = Map.empty (module String)
8-
98
let to_list (l : 'a t) : (string * 'a) list = Map.to_alist l
10-
119
let of_list (m : (string * 'a) list) : 'a t = Map.of_alist_exn (module String) m
12-
1310
let wrap = of_list
14-
1511
let unwrap = to_list
1612
end
1713

1814
module Re2 = struct
1915
include Re2
2016

2117
let wrap s = create_exn s
22-
2318
let unwrap = Re2.to_string
2419
end
2520

lib/github.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ type gh_link =
9393
| Commit of repository * commit_hash
9494

9595
let gh_link_re = Re2.create_exn {|^(.*)/(.+)/(.+)/(commit|pull|issues)/([a-z0-9]+)/?$|}
96-
9796
let gh_org_team_re = Re2.create_exn {|[a-zA-Z0-9\-]+/([a-zA-Z0-9\-]+)|}
9897

9998
(** [gh_link_of_string s] parses a URL string [s] to try to match a supported

0 commit comments

Comments
 (0)