Skip to content

Commit

Permalink
Report a bit more information on unsupported github events
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
JasonGross committed Mar 7, 2024
1 parent 1122573 commit 3f7dd98
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 @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3f7dd98

Please sign in to comment.