Skip to content

fix: ensure issues created outside templates receive needs-triage label#37505

Merged
mergify[bot] merged 4 commits intoaws:mainfrom
Abogical:fix/ensure-triage-label
Apr 3, 2026
Merged

fix: ensure issues created outside templates receive needs-triage label#37505
mergify[bot] merged 4 commits intoaws:mainfrom
Abogical:fix/ensure-triage-label

Conversation

@Abogical
Copy link
Copy Markdown
Member

@Abogical Abogical commented Apr 2, 2026

Issue # (if applicable)

Closes #37454.

Reason for this change

Issues created outside of GitHub issue templates (e.g., via the GitHub API, AI-assisted tools like Claude Code, or blank issue forms) never receive the needs-triage label. Since the issue-triage-manager workflow in issue-label-assign.yml requires needs-triage via included-labels, these issues are silently skipped — no area label, no assignee, no triage visibility.

Description of changes

Added a new lightweight workflow .github/workflows/ensure-triage-label.yml that:

  • Triggers on issues: [opened]
  • Checks if the newly opened issue has zero labels (join(github.event.issue.labels.*.name, '') == '')
  • If so, applies the needs-triage label using actions/github-script@v7

This ensures every new issue enters the triage pipeline regardless of how it was created, while preserving the existing template-based labeling for issues filed through the forms (which already have labels and won't match the if condition).

Describe any new or updated permissions being added

The workflow requests issues: write permission, scoped only to the ensure-triage-label job. This is the minimum permission needed to add a label to an issue.

Description of how you validated changes

Tested on a fork (Abogical/aws-cdk):

  1. Pushed the workflow to the fork's main branch so it becomes active
  2. Created a blank issue (no template, no labels): Abogical/aws-cdk#24
  3. The workflow ran successfully and applied needs-triage: workflow run

How the workflow works:

  • When a new issue is opened, GitHub triggers the ensure-triage-label workflow
  • The if condition checks whether the issue has any labels
  • If the issue has no labels (blank issue / API-created), the job runs and adds needs-triage
  • If the issue was created via a template (which pre-applies labels like bug, needs-triage), the condition is false and the job is skipped — no duplicate work

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Issues created via the GitHub API, AI assistants, or blank issue forms
don't go through issue templates, so they never receive the needs-triage
label. This means the issue-triage-manager workflow silently skips them.

Add a lightweight workflow that applies needs-triage to any newly opened
issue that has no labels, ensuring every issue enters the triage pipeline.

Closes aws#37454
@aws-cdk-automation aws-cdk-automation requested a review from a team April 2, 2026 11:50
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p1 labels Apr 2, 2026
@github-actions github-actions bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Apr 2, 2026
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 2, 2026
@mergify mergify bot temporarily deployed to automation April 2, 2026 11:50 Inactive
@mergify mergify bot temporarily deployed to automation April 2, 2026 11:51 Inactive
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@Abogical Abogical added pr-linter/exempt-test The PR linter will not require test changes pr-linter/exempt-integ-test The PR linter will not require integ test changes labels Apr 2, 2026
@aws-cdk-automation aws-cdk-automation dismissed their stale review April 2, 2026 12:26

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Apr 2, 2026
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Apr 2, 2026
@vishaalmehrishi vishaalmehrishi self-assigned this Apr 2, 2026
@Abogical Abogical requested a review from vishaalmehrishi April 2, 2026 15:30
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 3, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 3, 2026

Merge Queue Status

  • Entered queue2026-04-03 08:13 UTC · Rule: default-squash
  • Checks passed · in-place
  • Merged2026-04-03 08:50 UTC · at d18e2d26d94e379f83d6e52abff9d687d381d0b1

This pull request spent 36 minutes 38 seconds in the queue, including 30 minutes 35 seconds running CI.

Required conditions to merge

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 3, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 58cb92a into aws:main Apr 3, 2026
19 of 20 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue is a bug. contribution/core This is a PR that came from AWS. distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/medium Medium work item – several days of effort p1 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-test The PR linter will not require test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues created outside templates don't receive needs-triage label, bypassing all triage automation

3 participants