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 {
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>;
}