Add a web extension and debian package compilation (#5)
All checks were successful
Check go code / build-and-release (push) Successful in 1m9s

Reviewed-on: #5
Co-authored-by: Julien Fastré <julien.fastre@champs-libres.coop>
Co-committed-by: Julien Fastré <julien.fastre@champs-libres.coop>
This commit was merged in pull request #5.
This commit is contained in:
2025-11-12 19:10:41 +00:00
committed by Julien Fastré
parent d830f33eec
commit 0a64db6925
31 changed files with 7005 additions and 346 deletions

View File

@@ -3,22 +3,11 @@ extern crate reqwest;
extern crate serde;
extern crate simple_home_dir;
mod cli;
mod config;
mod debug;
mod error;
mod gitea;
mod gitlab;
mod openproject;
mod planning;
use crate::cli::Commands::{Planning, Test};
use crate::cli::Planning::I2work;
use crate::error::GeneralError;
use cl_cli::cli::Cli;
use cl_cli::cli::Commands::{Planning, Test};
use cl_cli::cli::Planning::I2work;
use cl_cli::error::GeneralError;
use clap::Parser;
use cli::Cli;
use config::Config;
use std::fs;
use std::path::PathBuf;
use std::process::exit;
@@ -34,22 +23,20 @@ async fn main() {
None => &default_config_path,
};
let config_path_content = match fs::read_to_string(config_path) {
Ok(content) => content,
let config = match cl_cli::config::build_config(config_path) {
Ok(c) => c,
Err(e) => {
println!(
"Could not read config file at {:?}, error: {}",
config_path, e
);
let general_error: GeneralError = e.into();
println!("{}", general_error.description);
exit(1);
}
};
let config: Config = toml::from_str(&*config_path_content).expect("Could not parse config");
let result = match cli.command {
Some(Planning(I2work(args))) => planning::issue2work::issue2work(config, &args).await,
Some(Test) => debug::debug(config).await,
Some(Planning(I2work(args))) => {
cl_cli::planning::issue2work::issue2work_cli(config, &args).await
}
Some(Test) => cl_cli::debug::debug(config).await,
None => Err(GeneralError {
description: "No command launched".to_string(),
}),