git-next/crates/forge-github/src/webhook/parse.rs

11 lines
297 B
Rust
Raw Normal View History

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