docs(github): update issue templates and triage workflow#2645
Conversation
Modernize the GitHub issue templates for bugs and feature requests, replacing informal formatting with structured Markdown sections. Update the auto-triage workflow and nightly scanner to use GitHub's native issue type system instead of kind/* labels. Key changes: - Rewrite bug report template with clearer sections for expected vs actual behavior, environment details, and error output - Rewrite feature request template with motivation, use cases, proposed solution, and alternatives sections - Add `type: Bug` and `type: Enhancement` frontmatter to use GitHub's native issue type system - Remove `kind/bug` and `kind/documentation` labels from both templates and the nightly scanner, as issue type is now set via GitHub's native type field - Update auto-triage workflow condition from checking for the `kind/bug` label to checking for issues with type `Bug`
There was a problem hiding this comment.
Assessment: 🔴 CRITICAL
The auto-triage workflow condition uses github.event.issue.type which is not a valid GitHub Actions context field for the issues: labeled event — the triage job will never execute. Additionally, the nightly scanner's updated instructions claim issue type is handled natively but the gh issue create command lacks the required --type flag.
| jobs: | ||
| triage: | ||
| if: github.event.label.name == 'kind/bug' | ||
| if: github.event.issue.node_id != '' && github.event.issue.type == 'Bug' |
There was a problem hiding this comment.
[HIGH] Triage workflow condition uses invalid github.event.issue.type field — job will never run
The workflow trigger is issues: types: [labeled], and the old condition correctly used github.event.label.name == 'kind/bug' (the label from the event payload). The new condition:
if: github.event.issue.node_id != '' && github.event.issue.type == 'Bug'github.event.issue.type is not a valid field in the GitHub Actions issues event payload. GitHub's native "issue type" feature is not exposed in the webhook payload as github.event.issue.type — the issue object mirrors the GitHub REST API, which does not include a type field in the labeled event context. This means:
github.event.issue.type == 'Bug'will always evaluate as falsy- The entire
triagejob will never execute for any issue
Suggested fix: Either keep label-based triggering (add back a kind/bug-equivalent label and check github.event.label.name) or change the workflow trigger from types: [labeled] to types: [opened, edited, typed] — GitHub supports typed as an issue event type for native type changes — and query the issue type via the REST API in a step.
| - `security` category → add `kind/bug` (security issues are bugs) | ||
| - `bug` category → add `kind/bug` | ||
| - `documentation` category → add `kind/documentation` | ||
| - Issue type is set separately via GitHub's native type system, not labels |
There was a problem hiding this comment.
[MEDIUM] Nightly scanner instructions say issue type is set separately, but gh issue create lacks --type flag
The updated instructions state:
"Issue type is set separately via GitHub's native type system, not labels"
However, the gh issue create command shown in this diff does not include --type:
cat << 'EOF' | gh issue create \
--title "$ISSUE_TITLE" \
--label "automated" \
--body-file -The gh CLI supports --type <type> for issue type assignment. Without it, issues created by the nightly scanner will have no native type set, making them invisible to any type-based triage automation (including the updated auto-triage workflow). The instruction is misleading because it implies the type will be handled, but the actual command doesn't do it.
Suggested fix: Add --type "Bug" (for security/bug categories) to the gh issue create command, for example:
gh issue create \
--title "$ISSUE_TITLE" \
--label "automated" \
--type "Bug" \
--body-file -
Modernize the GitHub issue templates for bugs and feature requests,
replacing informal formatting with structured Markdown sections.
Update the auto-triage workflow and nightly scanner to use GitHub's
native issue type system instead of kind/* labels.
Key changes:
vs actual behavior, environment details, and error output
proposed solution, and alternatives sections
type: Bugandtype: Enhancementfrontmatter to useGitHub's native issue type system
kind/bugandkind/documentationlabels from bothtemplates and the nightly scanner, as issue type is now set
via GitHub's native type field
kind/buglabel to checking for issues with typeBug