-
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?
Conversation
b5849a5 to
66c53b9
Compare
2410faf to
9d2a9ac
Compare
9d2a9ac to
094e748
Compare
kit-ty-kate
left a comment
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.
That looks alright, but i have a couple of comments for completeness sake
| repository: repository; | ||
| sender: user; | ||
| installation: app_installation_event; | ||
| } <ocaml field_prefix="check_run_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.
The documentation says this type also contain an (optional?) organization
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.
I have never received an organization so I could not verify if the existing type fits the one we receive. But I'm going to add an optional organization field now.
lib_data/github.atd
Outdated
| check_run: check_run; | ||
| repository: repository; | ||
| sender: user; | ||
| installation: 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.
Shouldn't this be optional?
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.
Changed to optional
| ] <json open_enum> | ||
|
|
||
| type check_run_event = { | ||
| action: check_run_action; |
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_action action, this type also has an (optional?) requested_action field
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.
the action might also be optional but i'm not sure
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_action then the action field is required is how I understand the docs. With other action types it is not marked as required
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.
I see what you mean now: you say if the action type is not the requested_action variant then this field is an optional. But the comments clearly say that there is a value being set to created, 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 option or is this ok?
| repository: repository; | ||
| sender: user; | ||
| installation: app_installation_event; | ||
| } <ocaml field_prefix="check_suite_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.
same for this one, an organization field might be there
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.
The optional enterprise field is also available
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.
We don't have an existing enterprise type and I also never received a webhook to be able to verify the return type.
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.
I would add the enterprise field in the future on demand
094e748 to
3af9935
Compare
3af9935 to
acb362c
Compare
|
@kit-ty-kate can I get a re-review? |
Added two missing webhook events: