11 lines
282 B
Rust
11 lines
282 B
Rust
|
//
|
||
|
use crate as forgejo;
|
||
|
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> {
|
||
|
serde_json::from_str::<forgejo::webhook::Push>(body.as_str())?.try_into()
|
||
|
}
|