Skip to content

Conversation

@marijanp
Copy link

@marijanp marijanp commented May 17, 2025

@marijanp marijanp force-pushed the add-check-events branch from b5849a5 to 66c53b9 Compare May 17, 2025 15:25
@marijanp marijanp marked this pull request as ready for review May 17, 2025 15:25
@marijanp marijanp force-pushed the add-check-events branch 3 times, most recently from 2410faf to 9d2a9ac Compare May 22, 2025 14:44
Copy link
Member

@kit-ty-kate kit-ty-kate left a 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_">
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

Copy link
Author

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.

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?

Copy link
Author

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;
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

Copy link
Author

@marijanp marijanp Nov 11, 2025

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

Copy link
Author

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_">
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

Copy link
Author

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.

Copy link
Author

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

@marijanp
Copy link
Author

@kit-ty-kate can I get a re-review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants