From 635aedc88dc4924ea3dac63f95d81620698fd5bb Mon Sep 17 00:00:00 2001 From: Cyborus Date: Mon, 11 Dec 2023 17:09:56 -0500 Subject: [PATCH] check release list before creating release --- tests/ci_test.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ci_test.rs b/tests/ci_test.rs index d8a4fa5..52e5efe 100644 --- a/tests/ci_test.rs +++ b/tests/ci_test.rs @@ -128,6 +128,8 @@ async fn repo(api: &forgejo_api::Forgejo) -> eyre::Result<()> { let _ = git().args(["fetch"]).status()?; let _ = git().args(["pull"]).status()?; + ensure!(api.get_releases("TestingAdmin", "test", forgejo_api::ReleaseQuery::default()).await.wrap_err("releases list not found")?.is_empty(), "there should be no releases yet"); + let tag_opt = forgejo_api::CreateTagOption { message: Some("This is a tag!".into()), tag_name: "v1.0".into(),