From 06bd1472deab2c957e4f1d021b850d1481b2779a Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:10:47 +1200 Subject: [PATCH] [CI] Keep original labels when PR has too many lines (#9745) --- .github/workflows/auto-label-pr.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-label-pr.yml b/.github/workflows/auto-label-pr.yml index f1321a86ee..488a72ffb3 100644 --- a/.github/workflows/auto-label-pr.yml +++ b/.github/workflows/auto-label-pr.yml @@ -414,7 +414,14 @@ jobs: if ((tooManyLabels || tooManyChanges) && !allowedTooBig) { const originalLength = finalLabels.length; console.log(`PR is too big - Labels: ${originalLength}, Changes: ${totalChanges}`); - finalLabels = ['too-big']; + + // If too big due to line changes only, keep original labels and add too-big + // If too big due to too many labels, replace with just too-big + if (tooManyChanges && !tooManyLabels) { + finalLabels.push('too-big'); + } else { + finalLabels = ['too-big']; + } // Create appropriate review message let reviewBody;