Show commit details above changed files

This commit is contained in:
Georg Bauer
2026-08-01 14:27:28 +02:00
parent 5396a805b0
commit 3a69b70395
9 changed files with 461 additions and 57 deletions

View File

@@ -189,22 +189,17 @@ impl Client {
})
}
pub async fn commit_files(
&self,
repository: &RepositoryId,
sha: &str,
) -> Result<Vec<models::CommitAffectedFiles>> {
pub async fn commit(&self, repository: &RepositoryId, sha: &str) -> Result<models::Commit> {
apis::repository_api::repo_get_single_commit(
&self.configuration(),
&repository.owner,
&repository.repository,
sha,
Some(false),
Some(true),
None,
Some(true),
)
.await
.map(|commit| commit.files.unwrap_or_default())
.map_err(Error::generated)
}