Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/github_core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down
39 changes: 39 additions & 0 deletions lib_data/github.atd
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,8 @@ type merge = {
} <ocaml field_prefix="merge_">

type event_type = [
| CheckRun <json name="check_run">
| CheckSuite <json name="check_suite">
| CommitComment <json name="commit_comment">
| Create <json name="create">
| Delete <json name="delete">
Expand Down Expand Up @@ -1026,6 +1028,8 @@ type event = {
type events = event list

type event_hook_constr = [
| CheckRun <json name="check_run"> of check_run_event
| CheckSuite <json name="check_suite"> of check_suite_event
| CommitComment <json name="CommitCommentEvent"> of commit_comment_event
| Create <json name="CreateEvent"> of create_event
| Delete <json name="DeleteEvent"> of delete_event
Expand Down Expand Up @@ -1468,6 +1472,22 @@ type check_run_annotation = {

type check_run_annotations = check_run_annotation list

type check_run_action = [
| Completed <json name="completed">
| Created <json name="created">
| RequestedAction <json name="requested_action">
| Rerequested <json name="rerequested">
| Unknown of string
] <json open_enum>

type check_run_event = {
action: check_run_action;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the requested_action action, this type also has an (optional?) requested_action field

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the action might also be optional but i'm not sure

check_run: check_run;
repository: repository;
sender: user;
installation: app_installation_event;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be optional?

} <ocaml field_prefix="check_run_event_">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation says this type also contain an (optional?) organization


type check_suite_info = {
email: string;
name: string;
Expand Down Expand Up @@ -1517,3 +1537,22 @@ type check_suite_preferences = {
respository: repository;
}

type check_suite_action = [
| Completed <json name="completed">
| Requested <json name="requested">
| Rerequested <json name="rerequested">
| Unknown of string
] <json open_enum>

type check_suite_event = {
action: check_suite_action;
check_suite: check_suite;
repository: repository;
sender: user;
installation: app_installation_event;
} <ocaml field_prefix="check_suite_event_">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for this one, an organization field might be there

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The optional enterprise field is also available


type app_installation_event = {
id: int <ocaml repr="int64">;
node_id: string;
} <ocaml field_prefix="app_installation_event_">