Skip to content

Commit 2c67a28

Browse files
committed
format: fixed ocamlformat for action.ml and slack.ml
1 parent 35d2e51 commit 2c67a28

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

lib/action.ml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -248,21 +248,22 @@ module Action (Github_api : Api.Github) (Slack_api : Api.Slack) = struct
248248
match validate_signature secrets payload with
249249
| Error e -> action_error e
250250
| Ok () ->
251-
let repo = Github.repo_of_notification payload in
252-
match repo_is_supported secrets repo with
253-
| false -> action_error @@ Printf.sprintf "unsupported repository %s" repo.url
254-
| true ->
255-
( match%lwt refresh_repo_config ctx payload with
256-
| Error e -> action_error e
257-
| Ok () ->
258-
let%lwt notifications = generate_notifications ctx payload in
259-
let%lwt () = Lwt.join [ send_notifications ctx notifications; do_github_tasks ctx repo payload ] in
260-
( match ctx.state_filepath with
261-
| None -> Lwt.return_unit
262-
| Some path ->
263-
( match%lwt State.save ctx.state path with
264-
| Ok () -> Lwt.return_unit
265-
| Error e -> action_error e
251+
let repo = Github.repo_of_notification payload in
252+
( match repo_is_supported secrets repo with
253+
| false -> action_error @@ Printf.sprintf "unsupported repository %s" repo.url
254+
| true ->
255+
( match%lwt refresh_repo_config ctx payload with
256+
| Error e -> action_error e
257+
| Ok () ->
258+
let%lwt notifications = generate_notifications ctx payload in
259+
let%lwt () = Lwt.join [ send_notifications ctx notifications; do_github_tasks ctx repo payload ] in
260+
( match ctx.state_filepath with
261+
| None -> Lwt.return_unit
262+
| Some path ->
263+
( match%lwt State.save ctx.state path with
264+
| Ok () -> Lwt.return_unit
265+
| Error e -> action_error e
266+
)
266267
)
267268
)
268269
)

lib/slack.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ let generate_pr_review_notification notification channel =
8989
)
9090
in
9191
let summary =
92-
sprintf "<%s|[%s]> *%s* <%s|%s> #%d %s" repository.url repository.full_name sender.login review.html_url
93-
action_str number (pp_link ~url:html_url title)
92+
sprintf "<%s|[%s]> *%s* <%s|%s> #%d %s" repository.url repository.full_name sender.login review.html_url action_str
93+
number (pp_link ~url:html_url title)
9494
in
9595
{
9696
channel;
@@ -343,8 +343,8 @@ let generate_commit_comment_notification api_commit notification channel =
343343
| Some c -> c
344344
in
345345
let summary =
346-
sprintf "<%s|[%s]> *%s* commented on `%s` %s" repository.url repository.full_name sender.login (pp_link ~url:comment.html_url
347-
(git_short_sha_hash commit_id))
346+
sprintf "<%s|[%s]> *%s* commented on `%s` %s" repository.url repository.full_name sender.login
347+
(pp_link ~url:comment.html_url (git_short_sha_hash commit_id))
348348
(first_line (escape commit.message))
349349
in
350350
let path =

0 commit comments

Comments
 (0)