Skip to content

Commit

Permalink
fix buildkite url parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tatchi committed Apr 1, 2024
1 parent 7ab7b7a commit 1a70090
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/slack.ml
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ let generate_status_notification (cfg : Config_t.config) (notification : status_
(* Keep only the portion of the url before /builds/... *)
let pipeline_url =
match String.split_on_char '/' target_url with
| "https:" :: "" :: "buildkite.com" :: "org" :: pipeline :: "builds" :: _ ->
Some (Printf.sprintf "https://buildkite.com/org/%s" pipeline)
| "https:" :: "" :: "buildkite.com" :: org :: pipeline :: "builds" :: _ ->
Some (Printf.sprintf "https://buildkite.com/%s/%s" org pipeline)
| _ -> None
in
match pipeline_url with
Expand Down

0 comments on commit 1a70090

Please sign in to comment.