Skip to content

Commit 12ad1a2

Browse files
committed
Add fallback for backwards compatibility (and hide state)
1 parent bb4b245 commit 12ad1a2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/build.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ let notify ?channel ~web_ui ~service ~commit ~repo x =
3131
| None -> x
3232
| Some { Slack_channel.uri; mode; repositories = _ } ->
3333
let s =
34-
let+ state = Current.state x
34+
let+ state = Current.state ~hidden:true x
3535
and+ commit in
3636
match state, mode with
3737
| Error (`Msg _), Slack_channel.Failure

src/slack_channel.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,7 @@ let parse_json s =
4040
in
4141
try
4242
from_string s |> Util.to_list |> List.map read_channel
43-
with ex ->
44-
Fmt.failwith "Failed to parse slack URIs '%S': %a" s Fmt.exn ex
43+
with _ ->
44+
let uri = Current_slack.channel @@ Uri.of_string @@ String.trim s in
45+
[ { uri; mode = All; repositories = All_repos } ]
46+
(* Fmt.failwith "Failed to parse slack URIs '%S': %a" s Fmt.exn e *)

0 commit comments

Comments
 (0)