Skip to content

Commit 302337a

Browse files
authored
Report a bit more information on unsupported github events (#299)
This will make it easier to add more events in the future.
2 parents 7cdf89f + 3f7dd98 commit 302337a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bot-components/GitHub_subscriptions.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ let github_action ~event ~action json =
197197
| "check_suite", "requested" ->
198198
Ok (CheckSuiteRequested (check_suite_info_of_json json))
199199
| _ ->
200-
Ok (UnsupportedEvent "Unsupported GitHub action.")
200+
Ok (UnsupportedEvent (f "Unsupported GitHub action %s / %s." event action))
201201

202202
let github_event ~event json =
203203
match event with
@@ -224,7 +224,7 @@ let github_event ~event json =
224224
| ref_type ->
225225
Error (f "Unexpected ref_type: %s" ref_type) )
226226
| _ ->
227-
Ok (UnsupportedEvent "Unsupported GitHub event.")
227+
Ok (UnsupportedEvent (f "Unsupported GitHub event %s." event))
228228

229229
let receive_github ~secret headers body =
230230
let open Result.Monad_infix in

0 commit comments

Comments
 (0)