ci/github-script/reviewers: improve "needs: reviewers" label
This should fix the bug where the "needs: reviewer" label was set too early, just to be removed immediately, because reviewers were then requested.
This commit is contained in:
@@ -375,7 +375,10 @@ module.exports = async ({ github, context, core, dry }) => {
|
||||
})
|
||||
|
||||
if (!pull_request.draft) {
|
||||
await handleReviewers({
|
||||
// We set this label earlier already, but the current PR state can be very different
|
||||
// after handleReviewers has requested reviews, so update it in this case to prevent
|
||||
// this label from flip-flopping.
|
||||
prLabels['9.needs: reviewer'] = await handleReviewers({
|
||||
github,
|
||||
context,
|
||||
core,
|
||||
|
||||
Reference in New Issue
Block a user