Skip to content

Commit 66c53b9

Browse files
committed
Add check run and check suite events
1 parent 217dcd5 commit 66c53b9

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

lib/github_core.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,10 @@ module Make(Env : Github_s.Env)(Time : Github_s.Time)(CL : Cohttp_lwt.S.Client)
12901290
match Github_j.event_type_of_string ("\"" ^ constr ^ "\"") with
12911291
| `CommitComment ->
12921292
`CommitComment (Github_j.commit_comment_event_of_string payload)
1293+
| `CheckRun ->
1294+
`CheckRun (Github_j.check_run_event_of_string payload)
1295+
| `CheckSuite->
1296+
`CheckSuite (Github_j.check_suite_event_of_string payload)
12931297
| `Create ->
12941298
`Create (Github_j.create_event_of_string payload)
12951299
| `Delete ->

lib_data/github.atd

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,8 @@ type merge = {
948948
} <ocaml field_prefix="merge_">
949949

950950
type event_type = [
951+
| CheckRun <json name="check_run">
952+
| CheckSuite <json name="check_suite">
951953
| CommitComment <json name="commit_comment">
952954
| Create <json name="create">
953955
| Delete <json name="delete">
@@ -1026,6 +1028,8 @@ type event = {
10261028
type events = event list
10271029

10281030
type event_hook_constr = [
1031+
| CheckRun <json name="check_run"> of check_run_event
1032+
| CheckSuite <json name="check_suite"> of check_suite_event
10291033
| CommitComment <json name="CommitCommentEvent"> of commit_comment_event
10301034
| Create <json name="CreateEvent"> of create_event
10311035
| Delete <json name="DeleteEvent"> of delete_event
@@ -1468,6 +1472,19 @@ type check_run_annotation = {
14681472

14691473
type check_run_annotations = check_run_annotation list
14701474

1475+
type check_run_action = [
1476+
| Completed <json name="completed">
1477+
| Created <json name="created">
1478+
| RequestedAction <json name="requested_action">
1479+
| Rerequested <json name="rerequested">
1480+
| Unknown of string
1481+
] <json open_enum>
1482+
1483+
type check_run_event = {
1484+
action: check_run_action;
1485+
check_run: check_run;
1486+
} <ocaml field_prefix="check_run_event_">
1487+
14711488
type check_suite_info = {
14721489
email: string;
14731490
name: string;
@@ -1517,3 +1534,14 @@ type check_suite_preferences = {
15171534
respository: repository;
15181535
}
15191536

1537+
type check_suite_action = [
1538+
| Completed <json name="completed">
1539+
| Rerequested <json name="rerequested">
1540+
| Unknown of string
1541+
] <json open_enum>
1542+
1543+
type check_suite_event = {
1544+
action: check_suite_action;
1545+
check_suite: check_suite;
1546+
} <ocaml field_prefix="check_suite_event_">
1547+

0 commit comments

Comments
 (0)