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:
Wolfgang Walther
2025-11-04 18:29:12 +01:00
parent a23d0ab24c
commit e68b0aef13
2 changed files with 13 additions and 2 deletions

View File

@@ -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,