git-next/crates/forge-github/src/webhook/parse.rs
Paul Campbell 1eb4ed6d23
All checks were successful
Rust / build (push) Successful in 1m14s
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
fix: add missing list webhooks implementation
2024-05-31 08:09:00 +01:00

10 lines
286 B
Rust

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