Skip to content

Commit

Permalink
Simplify Contributions.pp_title (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetiot authored Mar 13, 2024
1 parent 8f6166f commit 06b50ca
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/contributions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
| "" -> ()
Expand Down

0 comments on commit 06b50ca

Please sign in to comment.