Skip to content

armgit / zed

Public Imported from GitHub
0

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.yml
index 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,