-
Notifications
You must be signed in to change notification settings - Fork 55
Add check run and check suite events #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"> | ||
|
|
@@ -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 | ||
|
|
@@ -1468,6 +1472,23 @@ 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; | ||
| check_run: check_run; | ||
| repository: repository; | ||
| sender: user; | ||
| ?installation: app_installation_event option; | ||
| ?organization: organization option; | ||
| } <ocaml field_prefix="check_run_event_"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The documentation says this type also contain an (optional?)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have never received an |
||
|
|
||
| type check_suite_info = { | ||
| email: string; | ||
| name: string; | ||
|
|
@@ -1517,3 +1538,23 @@ 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 option; | ||
| ?organization: organization option; | ||
| } <ocaml field_prefix="check_suite_event_"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same for this one, an
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The optional
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't have an existing enterprise type and I also never received a webhook to be able to verify the return type.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would add the |
||
|
|
||
| type app_installation_event = { | ||
| id: int <ocaml repr="int64">; | ||
| node_id: string; | ||
| } <ocaml field_prefix="app_installation_event_"> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the
requested_actionaction, this type also has an (optional?)requested_actionfieldThere was a problem hiding this comment.
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
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
action = requested_actionthen theactionfield is required is how I understand the docs. With other action types it is not marked asrequiredThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean now: you say if the action type is not the
requested_actionvariant then this field is an optional. But the comments clearly say that there is a value being set tocreated,completed,rerequested. I have also never received a webhook without these being set.The docs are really awkward, would you prefer to proceed with an
optionor is this ok?