2024-05-25 11:25:13 +01:00
|
|
|
//
|
|
|
|
use crate as forgejo;
|
|
|
|
use git_next_config as config;
|
|
|
|
use git_next_git as git;
|
|
|
|
|
|
|
|
pub fn parse_body(
|
2024-06-19 07:03:08 +01:00
|
|
|
body: &config::webhook::forge_notification::Body,
|
2024-05-25 11:25:13 +01:00
|
|
|
) -> git::forge::webhook::Result<config::webhook::Push> {
|
|
|
|
serde_json::from_str::<forgejo::webhook::Push>(body.as_str())?.try_into()
|
|
|
|
}
|