Skip to content

Commit 3e80a04

Browse files
committed
slack: avoid shortening commit list to "+1 more"
1 parent 4150336 commit 3e80a04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/slack.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ let generate_push_notification notification channel =
264264
let title = first_line message in
265265
sprintf "`<%s|%s>` %s - %s" url (git_short_sha_hash id) title author.name
266266
in
267-
(* truncation point depends on line length, but 10 lines seems okay for most cases *)
268-
let num_shown = 10 in
267+
(* truncation point depends on line length, but 7+3 lines seems okay for most cases *)
268+
let num_shown = 7 in
269269
let dropped = num_commits - num_shown in
270-
if dropped > 0 then begin
270+
if dropped > 3 then begin
271271
let h, commits' = List.split_n commits (num_shown / 2) in
272272
let t = List.drop commits' dropped in
273273
List.concat [ List.map ~f:pp_commit h; [ sprintf "+%d more..." dropped ]; List.map ~f:pp_commit t ]

0 commit comments

Comments
 (0)