Skip to content
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

Add Webhook events payload deserialization #427

Merged
merged 1 commit into from
Jul 30, 2023

Conversation

gagbo
Copy link
Contributor

@gagbo gagbo commented Jul 27, 2023

This commit will be force pushed regularly, as progressively elements
for which we have example payloads will be more precise than just
serde_json::Value. This commit is pushed to enable an initial review
over the architecture/scope of the changes.

Closes #419

@gagbo gagbo force-pushed the feat/add_webhook_payloads branch from 3c2073c to 1b74556 Compare July 27, 2023 14:52
@gagbo
Copy link
Contributor Author

gagbo commented Jul 27, 2023

The main issue with the PR is that there is not a lot of documentation about webhook events schema. So I will only fill the data for the payloads I got examples for, and mostly leave "optimistic" types where possible.

@gagbo gagbo force-pushed the feat/add_webhook_payloads branch 4 times, most recently from 5b023ca to ce4a715 Compare July 28, 2023 11:20
Implement deserialization of payloads as described in
https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads

The payloads themselves do not implement `Deserialize`, since the event
type information is located in headers, not in the payload itself.
@gagbo gagbo force-pushed the feat/add_webhook_payloads branch from ce4a715 to ee17078 Compare July 28, 2023 13:36
@gagbo gagbo marked this pull request as ready for review July 28, 2023 13:45
@gagbo
Copy link
Contributor Author

gagbo commented Jul 28, 2023

I still need to flesh out the documentation I think

@XAMPPRocky
Copy link
Owner

Thank you for your PR! Feel free to make a follow-up PR with the documentation. 🙂

@XAMPPRocky XAMPPRocky merged commit d46de1f into XAMPPRocky:main Jul 30, 2023
@github-actions github-actions bot mentioned this pull request Jul 30, 2023
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.

missing fields in some structs?
2 participants