From fe0d953baf170d91d7a4bb6c6b6adc372f7537ee Mon Sep 17 00:00:00 2001 From: Urgau Date: Thu, 2 Oct 2025 15:54:50 +0200 Subject: [PATCH] Improve removal of multiple GitHub labels at the same time --- src/github.rs | 58 ++++++++++++++++++++------------ src/handlers/autolabel.rs | 19 ++++------- src/handlers/check_commits.rs | 18 ++++++---- src/handlers/concern.rs | 19 +++++++---- src/handlers/major_change.rs | 7 +++- src/handlers/merge_conflicts.rs | 10 ++++-- src/handlers/relabel.rs | 18 +++++----- src/handlers/review_requested.rs | 15 +++++++-- src/handlers/review_submitted.rs | 17 ++++++++-- src/handlers/shortcut.rs | 16 ++++++--- 10 files changed, 124 insertions(+), 73 deletions(-) diff --git a/src/github.rs b/src/github.rs index 0ef421604..236b07897 100644 --- a/src/github.rs +++ b/src/github.rs @@ -785,33 +785,47 @@ impl Issue { Ok(()) } - pub async fn remove_label(&self, client: &GithubClient, label: &str) -> anyhow::Result<()> { - log::info!("remove_label from {}: {:?}", self.global_id(), label); - // DELETE /repos/:owner/:repo/issues/:number/labels/{name} - let url = format!( - "{repo_url}/issues/{number}/labels/{name}", - repo_url = self.repository().url(client), - number = self.number, - name = label, + pub async fn remove_labels( + &self, + client: &GithubClient, + labels: Vec