rust-lang / triagebot

Automation/tooling for Rust spaces
https://triage.rust-lang.org
Apache License 2.0
172 stars 74 forks source link

When a PR is closed cleanup labels that are not useful anymore #1732

Closed apiraino closed 11 months ago

apiraino commented 11 months ago

When PRs are closed (therefore not merged), the review labels (S-waiting-on-author or S-waiting-on-review) are not removed. Since they are not useful anymore they can be removed. Take into account both ways that a PR can be closed:

This small cleanup can help f.e. when looking for all PRs waiting on a review: the is:open filter would not be needed anymore.

I'm probably forgetting other labels that can be removed as well.

apiraino commented 11 months ago

@rustbot claim

Mark-Simulacrum commented 11 months ago

I feel like the costs of doing this (extra code, opportunity for bugs when a PR is closed + opened in quick succession...) are significantly higher than adding is:open to the search query, if that's the only motivation.

apiraino commented 11 months ago

main motivation is trying to keep the issue tracker a bit tidy[^1]. But if you think there are too many unknown unknowns I will just close this :slightly_smiling_face:

For reference, we have now:

(these numbers don't tell the whole story, of course)

[^1]: incidentally making my bookkeeping work of following PRs waiting for a review a bit easier

Mark-Simulacrum commented 11 months ago

I'd be happy to do a cron task that does this after 7 days of PR being closed or something if you want? But I don't think I understand the cost to your scripts yet.

apiraino commented 11 months ago

thanks for the suggestion, I'll think about it.