From 45c42366e40da41c75bac905ba485f595040cd59 Mon Sep 17 00:00:00 2001 From: Brett Blue <84536271+brett0000FF@users.noreply.github.com> Date: Wed, 24 Dec 2025 09:51:45 -0700 Subject: [PATCH 1/2] Fix review state tracking logic State tracking logic breaks when a reviewer adds a comment after an approval --- .github/workflows/codeowner_review_status.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeowner_review_status.yml b/.github/workflows/codeowner_review_status.yml index a09f5b21a4e..94bb04fb8e7 100644 --- a/.github/workflows/codeowner_review_status.yml +++ b/.github/workflows/codeowner_review_status.yml @@ -60,9 +60,9 @@ jobs: pull_number: number, }); - // Track latest review state per user - const latestReviews = new Map(); + // Track latest review state per user (ignore commented state) reviews.forEach(review => { + if (review.state === 'COMMENTED') return; const existing = latestReviews.get(review.user.login); if (!existing || review.submitted_at > existing.submitted_at) { latestReviews.set(review.user.login, review); @@ -200,4 +200,4 @@ jobs: description: statusDescription, context: 'Documentation Team Approval' }); - console.log(`Created commit status: ${statusState} - ${statusDescription}`); \ No newline at end of file + console.log(`Created commit status: ${statusState} - ${statusDescription}`); From 9b619a3105898829f6384772c7665d31dc70144c Mon Sep 17 00:00:00 2001 From: Brett Blue <84536271+brett0000FF@users.noreply.github.com> Date: Mon, 29 Dec 2025 13:19:23 -0700 Subject: [PATCH 2/2] Update codeowner_review_status.yml --- .github/workflows/codeowner_review_status.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codeowner_review_status.yml b/.github/workflows/codeowner_review_status.yml index 94bb04fb8e7..137f7913334 100644 --- a/.github/workflows/codeowner_review_status.yml +++ b/.github/workflows/codeowner_review_status.yml @@ -61,6 +61,7 @@ jobs: }); // Track latest review state per user (ignore commented state) + const latestReviews = new Map(); reviews.forEach(review => { if (review.state === 'COMMENTED') return; const existing = latestReviews.get(review.user.login);