WIP: forgejo: ???

This commit is contained in:
Paul Campbell 2024-06-19 07:02:49 +01:00
parent 8f786abe60
commit bd3fb7cff2
2 changed files with 10 additions and 7 deletions

View file

@ -19,38 +19,41 @@ impl git::ForgeLike for MockForge {
_msg: &config::WebhookMessage, _msg: &config::WebhookMessage,
_expected: &config::WebhookAuth, _expected: &config::WebhookAuth,
) -> bool { ) -> bool {
todo!() todo!("MockForge::is_message_authorised")
} }
fn parse_webhook_body( fn parse_webhook_body(
&self, &self,
_body: &config::webhook::message::Body, _body: &config::webhook::message::Body,
) -> git::forge::webhook::Result<config::webhook::push::Push> { ) -> git::forge::webhook::Result<config::webhook::push::Push> {
todo!() todo!("MockForge::parse_webhook_body")
} }
async fn commit_status(&self, _commit: &git::Commit) -> git::forge::commit::Status { async fn commit_status(&self, _commit: &git::Commit) -> git::forge::commit::Status {
todo!() todo!("MockForge::commit_status")
} }
async fn list_webhooks( async fn list_webhooks(
&self, &self,
_webhook_url: &config::server::WebhookUrl, _webhook_url: &config::server::WebhookUrl,
) -> git::forge::webhook::Result<Vec<config::WebhookId>> { ) -> git::forge::webhook::Result<Vec<config::WebhookId>> {
todo!() todo!("MockForge::list_webhooks")
} }
async fn unregister_webhook( async fn unregister_webhook(
&self, &self,
_webhook_id: &config::WebhookId, _webhook_id: &config::WebhookId,
) -> git::forge::webhook::Result<()> { ) -> git::forge::webhook::Result<()> {
todo!() todo!("MockForge::unregister_webhook")
} }
async fn register_webhook( async fn register_webhook(
&self, &self,
_webhook_url: &config::server::WebhookUrl, _webhook_url: &config::server::WebhookUrl,
) -> git::forge::webhook::Result<config::RegisteredWebhook> { ) -> git::forge::webhook::Result<config::RegisteredWebhook> {
todo!() Ok(config::RegisteredWebhook::new(
config::WebhookId::new(""),
config::WebhookAuth::new(ulid::Ulid::new()),
))
} }
} }

View file

@ -30,7 +30,7 @@ fn test_github_name() {
fn given_fs() -> kxio::fs::FileSystem { fn given_fs() -> kxio::fs::FileSystem {
kxio::fs::temp().unwrap_or_else(|e| { kxio::fs::temp().unwrap_or_else(|e| {
eprintln!("{e}"); println!("{e}");
panic!("fs") panic!("fs")
}) })
} }