From b810e775258428cc59eae483bf5349aa6a8e0845 Mon Sep 17 00:00:00 2001 From: Guillaume Petiot Date: Wed, 13 Mar 2024 20:42:31 +0000 Subject: [PATCH] Simplify Contributions.pp_title --- lib/contributions.ml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/contributions.ml b/lib/contributions.ml index f041b28..bbb4e81 100644 --- a/lib/contributions.ml +++ b/lib/contributions.ml @@ -180,11 +180,7 @@ let pp_title f t = | `Issue -> Fmt.pf f "%s [#%s](%s)" t.title (id t.url) t.url | `PR -> Fmt.pf f "%s [#%s](%s)" t.title (id t.url) t.url | `Review s -> Fmt.pf f "%s %s [#%s](%s)" s t.title (id t.url) t.url - | `New_repo -> ( - match Astring.String.cuts ~sep:"/" t.url |> List.rev with - | repo :: org :: _ -> - Fmt.pf f "Created repository [%s/%s](%s)" org repo t.url - | _ -> Fmt.failwith "Malformed URL %S" t.url) + | `New_repo -> Fmt.pf f "Created repository [%s](%s)" t.repo t.url let pp_body f = function | "" -> ()