git-next/crates/forge-github/src/webhook/parser.rs
Paul Campbell ad358ad7c2
All checks were successful
Rust / build (push) Successful in 2m17s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Release Please / Release-plz (push) Successful in 37s
refactor: cleanup pedantic clippy in forge-github crate
2024-08-06 16:21:25 +01:00

10 lines
261 B
Rust

//
use crate as github;
use git_next_core::{git, webhook};
pub fn parse_body(
body: &webhook::forge_notification::Body,
) -> git::forge::webhook::Result<webhook::push::Push> {
serde_json::from_str::<github::webhook::Push>(body.as_str())?.try_into()
}