summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock16
-rw-r--r--Cargo.toml2
-rw-r--r--src/keys.rs2
-rw-r--r--src/release.rs4
4 files changed, 19 insertions, 5 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 942e406..bfd101c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -104,6 +104,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
[[package]]
+name = "base64ct"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+
+[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -331,8 +337,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "forgejo-api"
version = "0.1.0"
-source = "git+https://codeberg.org/Cyborus/forgejo-api.git?rev=bfb341c3e6#bfb341c3e6917d58fe65822602cf3eb0b1d5071b"
+source = "git+https://codeberg.org/Cyborus/forgejo-api.git?rev=cb192d8eef#cb192d8eefcd0d58b51c05a6e4ded1db22caadbb"
dependencies = [
+ "base64ct",
"bytes",
"reqwest",
"serde",
@@ -342,6 +349,7 @@ dependencies = [
"time",
"tokio",
"url",
+ "zeroize",
]
[[package]]
@@ -1713,3 +1721,9 @@ dependencies = [
"cfg-if",
"windows-sys 0.48.0",
]
+
+[[package]]
+name = "zeroize"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
diff --git a/Cargo.toml b/Cargo.toml
index 41d4299..99e5e5a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,7 +10,7 @@ auth-git2 = "0.5.3"
clap = { version = "4.3.11", features = ["derive"] }
directories = "5.0.1"
eyre = "0.6.8"
-forgejo-api = { git = "https://codeberg.org/Cyborus/forgejo-api.git", rev = "bfb341c3e6" }
+forgejo-api = { git = "https://codeberg.org/Cyborus/forgejo-api.git", rev = "cb192d8eef" }
futures = "0.3.28"
git2 = "0.17.2"
open = "5.0.0"
diff --git a/src/keys.rs b/src/keys.rs
index aca310b..72ab86d 100644
--- a/src/keys.rs
+++ b/src/keys.rs
@@ -80,6 +80,6 @@ impl LoginInfo {
}
pub fn api_for(&self, url: &Url) -> Result<forgejo_api::Forgejo, forgejo_api::ForgejoError> {
- forgejo_api::Forgejo::new(&self.key, url.clone())
+ forgejo_api::Forgejo::new(forgejo_api::Auth::Token(&self.key), url.clone())
}
}
diff --git a/src/release.rs b/src/release.rs
index bbd1225..9661fb5 100644
--- a/src/release.rs
+++ b/src/release.rs
@@ -400,11 +400,11 @@ async fn download_asset(
let release = find_release(repo, api, &release).await?;
let file = match &*asset {
"source.zip" => {
- api.download_release_zip(repo.owner(), repo.name(), release.id)
+ api.download_zip_archive(repo.owner(), repo.name(), &release.tag_name)
.await?
}
"source.tar.gz" => {
- api.download_release_tarball(repo.owner(), repo.name(), release.id)
+ api.download_tarball_archive(repo.owner(), repo.name(), &release.tag_name)
.await?
}
name => {