2024-05-31 07:37:40 +01:00
|
|
|
//
|
|
|
|
use crate as github;
|
2024-07-25 09:02:43 +01:00
|
|
|
|
2024-07-26 06:49:09 +01:00
|
|
|
use git_next_core::{git, webhook};
|
2024-05-31 07:37:40 +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::Push> {
|
2024-05-31 07:37:40 +01:00
|
|
|
serde_json::from_str::<github::webhook::Push>(body.as_str())?.try_into()
|
|
|
|
}
|