Add repository file browser
This commit is contained in:
@@ -290,6 +290,26 @@ impl GotchaCore {
|
||||
Ok(commit_page(branches, &commits, branch.is_none()))
|
||||
}
|
||||
|
||||
pub async fn repository_contents(
|
||||
&self,
|
||||
owner: String,
|
||||
repository: String,
|
||||
path: String,
|
||||
) -> Result<Vec<RepositoryContentRow>, GotchaError> {
|
||||
Ok(repository_content_rows(
|
||||
load_repository_contents(&self.server()?, &owner, &repository, &path).await?,
|
||||
))
|
||||
}
|
||||
|
||||
pub async fn repository_file(
|
||||
&self,
|
||||
owner: String,
|
||||
repository: String,
|
||||
path: String,
|
||||
) -> Result<Vec<u8>, GotchaError> {
|
||||
Ok(load_repository_file(&self.server()?, &owner, &repository, &path).await?)
|
||||
}
|
||||
|
||||
pub async fn commit_files(
|
||||
&self,
|
||||
owner: String,
|
||||
|
||||
Reference in New Issue
Block a user