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