Skip to content

Commit acb362c

Browse files
committed
Add check run and check suite events
1 parent d70232b commit acb362c

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

lib/github_core.ml

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

lib_data/github.atd

Lines changed: 41 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,23 @@ 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+
repository: repository;
1487+
sender: user;
1488+
?installation: app_installation_event option;
1489+
?organization: organization option;
1490+
} <ocaml field_prefix="check_run_event_">
1491+
14711492
type check_suite_info = {
14721493
email: string;
14731494
name: string;
@@ -1517,3 +1538,23 @@ type check_suite_preferences = {
15171538
respository: repository;
15181539
}
15191540

1541+
type check_suite_action = [
1542+
| Completed <json name="completed">
1543+
| Requested <json name="requested">
1544+
| Rerequested <json name="rerequested">
1545+
| Unknown of string
1546+
] <json open_enum>
1547+
1548+
type check_suite_event = {
1549+
action: check_suite_action;
1550+
check_suite: check_suite;
1551+
repository: repository;
1552+
sender: user;
1553+
?installation: app_installation_event option;
1554+
?organization: organization option;
1555+
} <ocaml field_prefix="check_suite_event_">
1556+
1557+
type app_installation_event = {
1558+
id: int <ocaml repr="int64">;
1559+
node_id: string;
1560+
} <ocaml field_prefix="app_installation_event_">

0 commit comments

Comments
 (0)