We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de0a287 commit b92a2c3Copy full SHA for b92a2c3
lib/context.ml
@@ -67,8 +67,14 @@ let refresh_secrets ctx =
67
match get_local_file path with
68
| Error e -> fmt_error "error while getting local file: %s\nfailed to get secrets from file %s" e path
69
| Ok file ->
70
- ctx.secrets <- Some (Config_j.secrets_of_string file);
71
- Ok ctx
+ let secrets = Config_j.secrets_of_string file in
+ begin
72
+ match secrets.slack_access_token, secrets.slack_hooks with
73
+ | None, [] -> fmt_error "either slack_access_token or slack_hooks must be defined in file '%s'" path
74
+ | _ ->
75
+ ctx.secrets <- Some secrets;
76
+ Ok ctx
77
+ end
78
79
let refresh_state ctx =
80
match ctx.state_filepath with
0 commit comments