@@ -2,7 +2,6 @@ open Base
2
2
open Printf
3
3
open Github_t
4
4
open Slack_t
5
- open Common
6
5
open Mrkdwn
7
6
8
7
let color_of_state ?(draft = false ) ?(merged = false ) state =
@@ -146,19 +145,9 @@ let condense_file_changes files =
146
145
sprintf " modified %d files%s" (List. length files)
147
146
(if String. is_empty prefix_path then " " else sprintf " in `%s/`" prefix_path)
148
147
149
- let populate_commit ?(include_changes = true ) repository (commit : api_commit ) =
150
- let ({ sha; commit; url; author; files; _ } : api_commit ) = commit in
151
- let title =
152
- match author with
153
- | Some author ->
154
- sprintf " `<%s|%s>` %s - <%s|%s>" url (Slack. git_short_sha_hash sha)
155
- (escape_mrkdwn @@ first_line commit.message)
156
- (escape_mrkdwn author.html_url) (escape_mrkdwn commit.author.name)
157
- | None ->
158
- sprintf " `<%s|%s>` %s - %s" url (Slack. git_short_sha_hash sha)
159
- (escape_mrkdwn @@ first_line commit.message)
160
- (escape_mrkdwn commit.author.name)
161
- in
148
+ let populate_commit ?(include_changes = true ) repository (api_commit : api_commit ) =
149
+ let ({ sha; commit; author; files; _ } : api_commit ) = api_commit in
150
+ let title = Slack. pp_api_commit api_commit in
162
151
let changes () =
163
152
let where = condense_file_changes files in
164
153
let when_ =
@@ -190,11 +179,7 @@ let populate_commit ?(include_changes = true) repository (commit : api_commit) =
190
179
let fallback = sprintf " [%s] %s - %s" (Slack. git_short_sha_hash sha) commit.message commit.author.name in
191
180
{
192
181
(base_attachment repository) with
193
- footer =
194
- Some
195
- (simple_footer repository
196
- ^ if String. equal commit.committer.date commit.author.date then " " else " " ^ commit.committer.date
197
- );
182
+ footer = Some (simple_footer repository ^ commit.committer.date);
198
183
(*
199
184
author_name = Some author.login;
200
185
author_link = Some author.html_url;
0 commit comments