diff --git a/lib/github_core.ml b/lib/github_core.ml index d0e5db07..0044fd61 100644 --- a/lib/github_core.ml +++ b/lib/github_core.ml @@ -1291,6 +1291,10 @@ module Make(Env : Github_s.Env)(Time : Github_s.Time)(CL : Cohttp_lwt.S.Client) match Github_j.event_type_of_string ("\"" ^ constr ^ "\"") with | `CommitComment -> `CommitComment (Github_j.commit_comment_event_of_string payload) + | `CheckRun -> + `CheckRun (Github_j.check_run_event_of_string payload) + | `CheckSuite-> + `CheckSuite (Github_j.check_suite_event_of_string payload) | `Create -> `Create (Github_j.create_event_of_string payload) | `Delete -> diff --git a/lib_data/github.atd b/lib_data/github.atd index d8d64243..1359ba0d 100644 --- a/lib_data/github.atd +++ b/lib_data/github.atd @@ -948,6 +948,8 @@ type merge = { } type event_type = [ + | CheckRun + | CheckSuite | CommitComment | Create | Delete @@ -1026,6 +1028,8 @@ type event = { type events = event list type event_hook_constr = [ + | CheckRun of check_run_event + | CheckSuite of check_suite_event | CommitComment of commit_comment_event | Create of create_event | Delete of delete_event @@ -1468,6 +1472,22 @@ type check_run_annotation = { type check_run_annotations = check_run_annotation list +type check_run_action = [ + | Completed + | Created + | RequestedAction + | Rerequested + | Unknown of string +] + +type check_run_event = { + action: check_run_action; + check_run: check_run; + repository: repository; + sender: user; + installation: app_installation_event; +} + type check_suite_info = { email: string; name: string; @@ -1517,3 +1537,22 @@ type check_suite_preferences = { respository: repository; } +type check_suite_action = [ + | Completed + | Requested + | Rerequested + | Unknown of string +] + +type check_suite_event = { + action: check_suite_action; + check_suite: check_suite; + repository: repository; + sender: user; + installation: app_installation_event; +} + +type app_installation_event = { + id: int ; + node_id: string; +}