Setup a web extension and refactor code
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user