From 3f7dd98b8f73db5ed417a4bab4e8fa664abe7bc1 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Thu, 7 Mar 2024 15:19:49 -0800 Subject: [PATCH] Report a bit more information on unsupported github events This will make it easier to add more events in the future. --- bot-components/GitHub_subscriptions.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot-components/GitHub_subscriptions.ml b/bot-components/GitHub_subscriptions.ml index 0d19619e..1526ee54 100644 --- a/bot-components/GitHub_subscriptions.ml +++ b/bot-components/GitHub_subscriptions.ml @@ -198,7 +198,7 @@ let github_action ~event ~action json = | "check_suite", "requested" -> Ok (CheckSuiteRequested (check_suite_info_of_json json)) | _ -> - Ok (UnsupportedEvent "Unsupported GitHub action.") + Ok (UnsupportedEvent (f "Unsupported GitHub action %s / %s." event action)) let github_event ~event json = match event with @@ -225,7 +225,7 @@ let github_event ~event json = | ref_type -> Error (f "Unexpected ref_type: %s" ref_type) ) | _ -> - Ok (UnsupportedEvent "Unsupported GitHub event.") + Ok (UnsupportedEvent (f "Unsupported GitHub event %s." event)) let receive_github ~secret headers body = let open Result in