2024-05-25 11:25:13 +01:00
|
|
|
//
|
|
|
|
use crate as forgejo;
|
2024-07-25 09:02:43 +01:00
|
|
|
|
2024-07-26 06:49:09 +01:00
|
|
|
use git_next_core::{git, webhook};
|
2024-05-25 11:25:13 +01:00
|
|
|
|
|
|
|
pub fn parse_body(
|
2024-07-25 09:02:43 +01:00
|
|
|
body: &webhook::forge_notification::Body,
|
|
|
|
) -> git::forge::webhook::Result<webhook::Push> {
|
2024-05-25 11:25:13 +01:00
|
|
|
serde_json::from_str::<forgejo::webhook::Push>(body.as_str())?.try_into()
|
|
|
|
}
|