format
This commit is contained in:
parent
dccd4c51ba
commit
ce08cb4d7f
|
@ -213,7 +213,10 @@ impl Forgejo {
|
||||||
repo: &str,
|
repo: &str,
|
||||||
target: &str,
|
target: &str,
|
||||||
) -> Result<Option<bytes::Bytes>, ForgejoError> {
|
) -> Result<Option<bytes::Bytes>, ForgejoError> {
|
||||||
let request = self.client.get(format!("repos/{owner}/{repo}/archive/{target}.zip")).build()?;
|
let request = self
|
||||||
|
.client
|
||||||
|
.get(format!("repos/{owner}/{repo}/archive/{target}.zip"))
|
||||||
|
.build()?;
|
||||||
self.execute_opt_raw(request).await
|
self.execute_opt_raw(request).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +226,10 @@ impl Forgejo {
|
||||||
repo: &str,
|
repo: &str,
|
||||||
target: &str,
|
target: &str,
|
||||||
) -> Result<Option<bytes::Bytes>, ForgejoError> {
|
) -> Result<Option<bytes::Bytes>, ForgejoError> {
|
||||||
let request = self.client.get(format!("repos/{owner}/{repo}/archive/{target}.tar.gz")).build()?;
|
let request = self
|
||||||
|
.client
|
||||||
|
.get(format!("repos/{owner}/{repo}/archive/{target}.tar.gz"))
|
||||||
|
.build()?;
|
||||||
self.execute_opt_raw(request).await
|
self.execute_opt_raw(request).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,11 +244,15 @@ async fn repo(api: &forgejo_api::Forgejo) -> eyre::Result<()> {
|
||||||
"couldn't download attachment"
|
"couldn't download attachment"
|
||||||
);
|
);
|
||||||
ensure!(
|
ensure!(
|
||||||
api.download_zip_archive("TestingAdmin", "test", "v1.0").await?.is_some(),
|
api.download_zip_archive("TestingAdmin", "test", "v1.0")
|
||||||
|
.await?
|
||||||
|
.is_some(),
|
||||||
"couldn't download zip archive"
|
"couldn't download zip archive"
|
||||||
);
|
);
|
||||||
ensure!(
|
ensure!(
|
||||||
api.download_tarball_archive("TestingAdmin", "test", "v1.0").await?.is_some(),
|
api.download_tarball_archive("TestingAdmin", "test", "v1.0")
|
||||||
|
.await?
|
||||||
|
.is_some(),
|
||||||
"couldn't download tape archive"
|
"couldn't download tape archive"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue