git-next/crates/forge-github/src/webhook/parse.rs
Paul Campbell ab728c7364
All checks were successful
Rust / build (push) Successful in 2m54s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
refactor: merge config crate into core crate
2024-07-25 21:08:16 +01:00

11 lines
279 B
Rust

//
use crate as github;
use git_next_core::webhook;
use git_next_git as git;
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()
}