use crate::Result;
use crate::option::release::UpdateOption;
use crate::types::release::ReleaseInfo;
use crate::types::repo::RepoPath;
use async_trait::async_trait;
#[async_trait]
pub trait Release: Send + Sync {
async fn create(
&self,
repo_path: RepoPath<'_>,
tag_name: &str,
name: Option<&str>,
body: Option<&str>,
target_commitish: Option<&str>,
) -> Result<ReleaseInfo>;
async fn info(&self, repo_path: RepoPath<'_>, tag_name: Option<&str>) -> Result<ReleaseInfo>;
async fn list(&self, repo_path: RepoPath<'_>) -> Result<Vec<ReleaseInfo>>;
async fn update(
&self,
repo_path: RepoPath<'_>,
tag_name: &str,
option: UpdateOption,
) -> Result<ReleaseInfo>;
}