manager: Remove Stale label if present

The stale label provides an easy way to force CI runs for issues after
changing dependencies.
This commit is contained in:
Rahix 2025-05-22 15:24:57 +02:00
parent e274f6206c
commit f04beb5dea
4 changed files with 49 additions and 0 deletions

View file

@ -99,6 +99,12 @@ async fn run() -> anyhow::Result<()> {
if let Some(bot_comment) = bot_comment {
if bot_comment.body.contains(&hash) {
log::info!("Issue #{issue} is up-to-date, not editing comment.");
issue::remove_stale_label(&forgejo, &meta.issue.repository, issue)
.await
.with_context(|| {
format!("Failed to remove `Stale` label from issue #{issue}")
})?;
continue 'issues;
}
bot_comment.id
@ -128,6 +134,10 @@ async fn run() -> anyhow::Result<()> {
issue::update_bot_comment(&forgejo, &meta.issue.repository, comment_id, full_text)
.await
.with_context(|| format!("Failed to update the bot comment in issue #{issue}"))?;
issue::remove_stale_label(&forgejo, &meta.issue.repository, issue)
.await
.with_context(|| format!("Failed to remove `Stale` label from issue #{issue}"))?;
}
Ok(())