a06673b
use crate::error::RepoResult;
use crate::features::RepoService;
use super::types::{CombinedStatusView, CommitStatusPage, CreateStatusOption, ListStatusQuery};
use super::usecase;
pub type RepoResultAlias<T> = RepoResult<T>;
impl RepoService {
pub async fn list_commit_statuses(
&self,
actor: uuid::Uuid,
repo_id: uuid::Uuid,
sha: &str,
q: ListStatusQuery,
) -> RepoResult<CommitStatusPage> {
usecase::list_commit_statuses(self, actor, repo_id, sha, q).await
}
pub async fn create_commit_status(
&self,
actor: uuid::Uuid,
repo_id: uuid::Uuid,
sha: &str,
input: CreateStatusOption,
) -> super::types::CommitStatusView {
usecase::create_commit_status(self, actor, repo_id, sha, input)
.await
.expect("create_commit_status")
}
pub async fn list_commit_statuses_by_ref(
&self,
actor: uuid::Uuid,
repo_id: uuid::Uuid,
git_ref: &str,
q: ListStatusQuery,
) -> RepoResult<CommitStatusPage> {
usecase::list_commit_statuses_by_ref(self, actor, repo_id, git_ref, q).await
}
pub async fn combined_status_by_ref(
&self,
actor: uuid::Uuid,
repo_id: uuid::Uuid,
git_ref: &str,
) -> RepoResult<CombinedStatusView> {
usecase::combined_status_by_ref(self, actor, repo_id, git_ref).await
}
}