Skip to content

Conversation

@Urgau
Copy link
Member

@Urgau Urgau commented Oct 2, 2025

GitHub doesn't offer an API to remove multiple labels at the same time, this leads us to have to manually have for-loops to remove multiple of them.

Instead I propose that we paper over GitHub's API and do the multiple API calls (in parallel) in our helper, that will make the function consistent with add_labels and allow us to process the removal in parallel.

@Urgau Urgau requested a review from Kobzol October 2, 2025 14:00
pub async fn remove_labels(
&self,
client: &GithubClient,
labels: Vec<Label>,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unclear to me if taking a Vec<Label> is the right choice, in most cases we need to convert Vec<&str>/Vec<String> to it. Maybe we should take an impl IntoIterator<Item = &str> or something like that.

Copy link
Member

@Kobzol Kobzol Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine, although I'd use &[Label], but that doesn't matter that much (it would probably require more generic annotations).

@Urgau Urgau added this pull request to the merge queue Oct 2, 2025
Merged via the queue into rust-lang:master with commit 24d215a Oct 2, 2025
3 checks passed
@Urgau Urgau deleted the remove_labels branch October 2, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants