use crate::option::{CreateIssueOptions, IssueListOptions, UpdateIssueOptions};
use crate::types::issue::IssueInfo;
use async_trait::async_trait;
#[async_trait]
pub trait Issue: Send + Sync {
async fn create(
&self,
repo_path: (&str, &str),
title: &str,
body: Option<&str>,
option: Option<CreateIssueOptions>,
) -> crate::Result<IssueInfo>;
async fn info(
&self,
repo_path: (&str, &str),
issue_number: &str,
) -> crate::Result<IssueInfo>;
async fn list(
&self,
repo_path: (&str, &str),
options: Option<IssueListOptions>,
) -> crate::Result<Vec<IssueInfo>>;
async fn update(
&self,
repo_path: (&str, &str),
issue_number: &str,
options: Option<UpdateIssueOptions>,
) -> crate::Result<IssueInfo>;
}