From 1795da7b1f363b8434baed9f32d6a08f1b9703fc Mon Sep 17 00:00:00 2001 From: Liuqing Yue Date: Fri, 19 Jan 2024 14:13:36 +0800 Subject: [PATCH] fix(ci): remove pr author from review candidates (#4023) --- .github/scripts/assign_reviewers.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/scripts/assign_reviewers.js b/.github/scripts/assign_reviewers.js index 0d65fc5eed8..46a92399595 100644 --- a/.github/scripts/assign_reviewers.js +++ b/.github/scripts/assign_reviewers.js @@ -33,6 +33,13 @@ const candidates = [ async function run(github, context, core, fs) { try { + // remove PR author from candidates + const requesterUsername = context.payload.sender.login; + const index = candidates.indexOf(requesterUsername); + if (index > -1) { + candidates.splice(index, 1); + } + // Pick two reviewers from list const numberOfReviewers = 2; const repo = context.repo;