We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e977be5 commit 722c5c4Copy full SHA for 722c5c4
lib/slack.ml
@@ -268,8 +268,11 @@ let generate_push_notification notification channel =
268
(* truncation point depends on line length, but 10 lines seems okay for most cases *)
269
let num_shown = 10 in
270
let dropped = num_commits - num_shown in
271
- if dropped > 0 then
272
- List.rev_map_append (List.drop (List.rev commits) dropped) [ sprintf "+%d more..." dropped ] ~f:pp_commit
+ if dropped > 0 then begin
+ let h, commits' = List.split_n commits (num_shown / 2) in
273
+ let t = List.drop commits' dropped in
274
+ List.concat [ List.map ~f:pp_commit h; [ sprintf "+%d more..." dropped ]; List.map ~f:pp_commit t ]
275
+ end
276
else List.map commits ~f:pp_commit
277
in
278
{
0 commit comments