git-next/crates/forge-forgejo/src/webhook/parser.rs
Paul Campbell 067296ffab
Some checks are pending
Rust / build (push) Successful in 1m21s
Release Please / Release-plz (push) Waiting to run
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
refactor: cleanup pedantic clippy in forge-forgejo crate
2024-08-06 16:15:56 +01:00

10 lines
257 B
Rust

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