Setup a web extension and refactor code

This commit is contained in:
2025-11-07 22:39:06 +01:00
parent d830f33eec
commit c45e12ed9a
14 changed files with 306 additions and 60 deletions

View File

@@ -3,11 +3,21 @@ use crate::config::Config;
use crate::error::GeneralError;
use url::Url;
pub(crate) mod issue2work;
pub mod issue2work;
pub mod utils;
pub trait Issue2WorkActionTrait {
async fn run(&self, url: &Url, config: &Config, args: &Issue2Work) -> Result<(), GeneralError>;
fn run(
&self,
url: &Url,
config: &Config,
args: &Issue2Work,
) -> impl std::future::Future<Output = Result<Issue2WorkResult, GeneralError>> + Send;
fn supports(&self, url: &Url, config: &Config, args: &Issue2Work) -> bool;
}
pub struct Issue2WorkResult {
pub work_package_url: String,
pub subject: String,
}