Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Stop labeling reopened triaged issues as 'needs triage' (#63615)
Lenad56dca8084e8
diff --git a/.github/workflows/catch_blank_issues.yml b/.github/workflows/catch_blank_issues.ymlindex 15a61a50cfc..c37ea06d86e 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,