manager: Ignore errors while removing labels
This commit is contained in:
parent
24e834dde3
commit
6d7af36726
|
@ -101,7 +101,7 @@ pub async fn remove_stale_label(
|
||||||
if let Some(stale_label_id) = stale_label_id {
|
if let Some(stale_label_id) = stale_label_id {
|
||||||
log::info!("Removing `Stale` label from issue #{issue_number}...");
|
log::info!("Removing `Stale` label from issue #{issue_number}...");
|
||||||
|
|
||||||
forgejo
|
let res = forgejo
|
||||||
.issue_remove_label(
|
.issue_remove_label(
|
||||||
&meta.owner,
|
&meta.owner,
|
||||||
&meta.name,
|
&meta.name,
|
||||||
|
@ -111,8 +111,15 @@ pub async fn remove_stale_label(
|
||||||
updated_at: Some(time::OffsetDateTime::now_utc()),
|
updated_at: Some(time::OffsetDateTime::now_utc()),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.await
|
.await;
|
||||||
.context("Failed to remove the `Stale` label")?;
|
|
||||||
|
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(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue