From eb8cfea79d7cee6287e4752452824c00963a5f87 Mon Sep 17 00:00:00 2001 From: Diogo Correia Date: Sun, 9 Nov 2025 13:11:14 +0000 Subject: [PATCH] ci: fix "needs: reviewer" label being removed after self review --- ci/github-script/bot.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ci/github-script/bot.js b/ci/github-script/bot.js index 2b52955307ae..65db03ffaee5 100644 --- a/ci/github-script/bot.js +++ b/ci/github-script/bot.js @@ -210,7 +210,7 @@ module.exports = async ({ github, context, core, dry }) => { } } - // Check for any human reviews other than GitHub actions and other GitHub apps. + // Check for any human reviews other than the PR author, GitHub actions and other GitHub apps. // Accounts could be deleted as well, so don't count them. const reviews = ( await github.paginate(github.rest.pulls.listReviews, { @@ -218,7 +218,11 @@ module.exports = async ({ github, context, core, dry }) => { pull_number, }) ).filter( - (r) => r.user && !r.user.login.endsWith('[bot]') && r.user.type !== 'Bot', + (r) => + r.user && + !r.user.login.endsWith('[bot]') && + r.user.type !== 'Bot' && + r.user.id !== pull_request.user?.id, ) const approvals = new Set(