spritejs icon indicating copy to clipboard operation
spritejs copied to clipboard

Automate applying "review-needed" label

Open MasterOdin opened this issue 3 years ago • 5 comments

From Gitter, would be useful to apply the review-needed label automatically as new maintainers might not know it exists, and rules to apply it are generally static.

Quoting the relevant thread below as could not find a way to link to it.

Starbeamrainbowlabs @sbrl Dec 24 18:07 Don't forget to attach the review needed label to PRs that need a second review to allow for rapid identification & handling

Matthew Peveler @MasterOdin Dec 25 16:12 Do we want to automatically apply review needed to PRs that are X days old and have less than two reviews? Or just apply it any new PR? Feel like we could automate that tag...

Starbeamrainbowlabs @sbrl Dec 26 17:14 Sounds like a good idea, @MasterOdin!

Starbeamrainbowlabs @sbrl Dec 26 17:14 how do we automate tagging PRs already?

Matthew Peveler @MasterOdin Dec 26 17:45 A GH action (https://github.com/tldr-pages/tldr/blob/main/.github/workflows/labeler.yml) runs anytime someone writes to a PR which triggers https://github.com/tldr-pages/tldr-labeler-action

Matthew Peveler @MasterOdin Dec 26 17:46 For this proposal, could automate it to run when a PR is submitted, PR review is submitted, or just a nightly cron job depending on what criteria you'd want to have to apply that label

Starbeamrainbowlabs @sbrl Dec 26 18:03 Hmmmm, for now when a PR review is submitted seems like the best option Then we can check if the PR has 1 approval + no request changes, and then auto-label it with review-needed

MasterOdin avatar Dec 28 '21 14:12 MasterOdin

I think if possible, it should be added 24 hours after 0 or only 1 reviews

CleanMachine1 avatar Dec 29 '21 12:12 CleanMachine1

@CleanMachine1's suggestion sounds good. I therefore propose the following conditions:

  1. The PR has only 1 approval AND no request changes AND has been open for more than 24 hours
  2. The PR has no reviews AND is open for more than 24 hours

A stretch goal here could be to avoid labelling if the last comment made was by @tldr-bot.

As for implementing this, I suggest listening on when PR review are submitted & then keep track from there.

sbrl avatar Jan 06 '22 20:01 sbrl

Should there be a new label created named "Revision Needed" or something for the case where there's a comment by @tldr-bot or the PR request changes?

MasterOdin avatar Jan 06 '22 22:01 MasterOdin

Should there be a new label created named "Revision Needed" or something for the case where there's a comment by @tldr-bot or the PR request changes?

We kind of already have this in the form of the waiting tag. However I see no harm in adding it.

CleanMachine1 avatar Jan 07 '22 21:01 CleanMachine1

Ah, I missed the "waiting" label, yeah, that works.

MasterOdin avatar Jan 08 '22 03:01 MasterOdin