2023-11-25 23:09:49 +01:00
|
|
|
pub mod cli;
|
2023-12-28 14:17:31 +01:00
|
|
|
pub mod leptos_service;
|
2023-11-25 23:09:49 +01:00
|
|
|
pub use cli::*;
|
2023-11-25 21:41:17 +01:00
|
|
|
|
2023-11-25 23:09:49 +01:00
|
|
|
pub mod dagger_middleware;
|
2023-12-26 17:20:31 +01:00
|
|
|
pub mod node_service;
|
2023-12-29 17:18:02 +01:00
|
|
|
pub mod rust_lib;
|
2023-11-25 23:14:38 +01:00
|
|
|
pub mod rust_service;
|
2023-12-29 19:43:04 +01:00
|
|
|
pub mod cuddle_please {
|
|
|
|
use async_trait::async_trait;
|
|
|
|
use dagger_cuddle_please::{
|
|
|
|
models::CuddlePleaseSrcArgs, DaggerCuddlePlease, DaggerCuddlePleaseAction,
|
|
|
|
};
|
|
|
|
|
|
|
|
use crate::{MainAction, PullRequestAction};
|
|
|
|
|
|
|
|
pub struct CuddlePlease {
|
|
|
|
client: dagger_sdk::Query,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl CuddlePlease {
|
|
|
|
pub fn new(client: dagger_sdk::Query) -> Self {
|
|
|
|
Self { client }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[async_trait]
|
|
|
|
impl MainAction for CuddlePlease {
|
|
|
|
async fn execute_main(&self) -> eyre::Result<()> {
|
|
|
|
let client = self.client.clone();
|
|
|
|
|
|
|
|
let action = DaggerCuddlePlease::new(client);
|
|
|
|
|
|
|
|
action
|
|
|
|
.cuddle_please_src(&CuddlePleaseSrcArgs {
|
|
|
|
cuddle_image: "kasperhermansen/cuddle-please:latest".into(),
|
|
|
|
server: dagger_cuddle_please::models::SrcServer::Gitea {
|
|
|
|
token: std::env::var("CUDDLE_PLEASE_TOKEN")
|
|
|
|
.expect("CUDDLE_PLEASE_TOKEN to be present"),
|
|
|
|
},
|
|
|
|
log_level: Some(dagger_cuddle_please::models::LogLevel::Debug),
|
|
|
|
})
|
|
|
|
.await?;
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|