Open
Conversation
Collaborator
|
Error: Label E-needs-mcve can only be set by Rust team members Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip. |
Contributor
|
@JojoFlex1 did you (or could you) test this change? Self-assigning for review. thanks |
Author
|
@apiraino at first i ran cargo build and cargo test relabel and all 7 tests passed. So now i added a unit test specifically for the case-insensitive matching in src/github/issue.rs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So like when removing labels using @rustbot label -E-needs-mcve, the removal fails for labels with capital letters. This is cause the comparison in remove_labels was case-sensitive so -e-needs-mcve wouldn't match E-needs-mcve on the issue.
Adding labels works fine because GitHub's API handles case-insensitivity on their end. But removing requires an exact match with the label name as it exists on GitHub.
Now
Changed filter and contains to filter_map + find with a case-insensitive comparison. This also ensures we use the actual label name from the issue in the DELETE request, not the user-typed version.
#2214