From 6d7af36726e0e34de472623183ec5e27ba5b34ef Mon Sep 17 00:00:00 2001 From: Rahix Date: Thu, 22 May 2025 15:58:13 +0200 Subject: [PATCH] manager: Ignore errors while removing labels --- techtree-manager/src/issue.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/techtree-manager/src/issue.rs b/techtree-manager/src/issue.rs index 2a74293..9f1f5b7 100644 --- a/techtree-manager/src/issue.rs +++ b/techtree-manager/src/issue.rs @@ -101,7 +101,7 @@ pub async fn remove_stale_label( if let Some(stale_label_id) = stale_label_id { log::info!("Removing `Stale` label from issue #{issue_number}..."); - forgejo + let res = forgejo .issue_remove_label( &meta.owner, &meta.name, @@ -111,8 +111,15 @@ pub async fn remove_stale_label( updated_at: Some(time::OffsetDateTime::now_utc()), }, ) - .await - .context("Failed to remove the `Stale` label")?; + .await; + + if let Err(e) = res { + // At the moment, the token for Forgejo Actions cannot remove issue labels. + // See https://codeberg.org/forgejo/forgejo/issues/2415 + log::warn!( + "Failed to remove `Stale` label for #{issue_number}. This is a known Forgejo limitation at the moment... ({e})" + ); + } } Ok(())