Skip to content

Commit

Permalink
Report a bit more information on unsupported github events (#299)
Browse files Browse the repository at this point in the history
This will make it easier to add more events in the future.
  • Loading branch information
Zimmi48 authored Jul 15, 2024
2 parents 7cdf89f + 3f7dd98 commit 302337a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot-components/GitHub_subscriptions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,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
Expand All @@ -224,7 +224,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.Monad_infix in
Expand Down

0 comments on commit 302337a

Please sign in to comment.