Skip to content

Commit b7ccbe7

Browse files
committed
only show comments if non-zero
1 parent e54a209 commit b7ccbe7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/slack_message.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ let populate_pull_request repository (pull_request : pull_request) =
7373
[
7474
"Assignees", List.map assignees ~f:pp_github_user;
7575
"Labels", List.map labels ~f:pp_label;
76-
"Comments", [ Int.to_string comments ];
76+
("Comments", if comments > 0 then [ Int.to_string comments ] else []);
7777
"Reviewers", get_reviewers ();
7878
]
7979
|> List.filter_map ~f:(fun (t, v) -> if List.is_empty v then None else Some (t, String.concat v ~sep:", "))
@@ -99,7 +99,7 @@ let populate_issue repository (issue : issue) =
9999
[
100100
"Assignees", List.map assignees ~f:pp_github_user;
101101
"Labels", List.map labels ~f:pp_label;
102-
"Comments", [ Int.to_string comments ];
102+
("Comments", if comments > 0 then [ Int.to_string comments ] else []);
103103
]
104104
|> List.filter_map ~f:(fun (t, v) -> if List.is_empty v then None else Some (t, String.concat v ~sep:", "))
105105
|> List.map ~f:(fun (t, v) -> { title = Some t; value = v; short = true })

0 commit comments

Comments
 (0)