From d56dca8084e88c06df35a44ee103f41d21d06e10 Mon Sep 17 00:00:00 2001 From: Lena <241371603+zelenenka@users.noreply.github.com> Date: Wed, 2 Sep 2026 11:30:46 +0000 Subject: [PATCH] Stop labeling reopened triaged issues as 'needs triage' (#63615) Release Notes: - N/A --- .github/workflows/catch_blank_issues.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/catch_blank_issues.yml b/.github/workflows/catch_blank_issues.yml index 15a61a50cf..c37ea06d86 100644 --- a/.github/workflows/catch_blank_issues.yml +++ b/.github/workflows/catch_blank_issues.yml @@ -57,15 +57,27 @@ jobs: github-token: ${{ steps.get-app-token.outputs.token }} script: | const issue = context.payload.issue; - const hasTriageLabel = issue.labels.some( - label => label.name === 'state:needs triage' - ); + const labelNames = issue.labels.map(label => label.name); - if (hasTriageLabel) { + if (labelNames.includes('state:needs triage')) { console.log('Issue already has state:needs triage, skipping'); return; } + if (context.payload.action === 'reopened') { + const requiredPrefixes = ['area:', 'reach:', 'severity:']; + const alreadyTriaged = requiredPrefixes.every( + prefix => labelNames.some(name => name.startsWith(prefix)) + ); + + if (alreadyTriaged) { + console.log( + `Reopened issue #${issue.number} already has area:, reach: and severity: labels, skipping` + ); + return; + } + } + await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo,