fix: align issue template labels and validate them in label sync#212
Merged
Conversation
Issue form templates referenced labels that were not part of the label
set defined and synced by issue-labels-sync.yml, so templates could apply
labels that do not exist.
- Update question.yml (question -> type:question) and bug-report.yml
(bug -> type:bug) to use the defined type: labels.
- Add a validation step to issue-labels-sync.yml that fails the run if any
issue template references a label the workflow does not define. Templates
are parsed with js-yaml (a project dependency) rather than by hand.
- Install prod deps via `npm ci --omit=dev --ignore-scripts` on Node 24 so
the github-script step can require('js-yaml'); trigger the workflow on
ISSUE_TEMPLATE and workflow edits; run validation even when no squad
roster file exists.
- Record GitHubExpert standing rules in its charter: pin Node 24 in all
workflows, and always run `gh aw compile` when authoring agentic workflows.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents GitHub issue templates from drifting away from the repository’s authoritative label definitions by (1) aligning template labels with the type:* naming scheme and (2) adding a workflow-time validation that fails if any issue template references an undefined label.
Changes:
- Updated issue form templates to use
type:question/type:buginstead ofquestion/bug. - Enhanced
.github/workflows/issue-labels-sync.ymlto install prod deps and validate.github/ISSUE_TEMPLATE/*.yml|*.yamllabels against the workflow-defined label set, failing the run on mismatch. - Documented standing rules for Node 24 workflow pinning and compiling agentic workflows via
gh aw compilein the GitHubExpert charter.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .squad/agents/githubexpert/charter.md | Adds standing rules for Node 24 pinning and gh aw compile to keep workflow authoring consistent and enforceable. |
| .github/workflows/issue-labels-sync.yml | Adds Node setup + prod dependency install and validates issue template labels against the workflow-defined label set. |
| .github/ISSUE_TEMPLATE/question.yml | Aligns template label to type:question. |
| .github/ISSUE_TEMPLATE/bug-report.yml | Aligns template label to type:bug. |
petehauge
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The issue form templates were drifting from the label set that
issue-labels-sync.ymldefines and syncs.question.ymlusedquestionandbug-report.ymlusedbug, but the defined labels use thetype:prefix (type:question,type:bug). Nothing caught this drift, so a template could apply a label that does not exist in the repo.What changed
Template label fixes
question.yml:question->type:questionbug-report.yml:bug->type:bugGuardrail in the label-sync workflow
issue-labels-sync.ymlthat scans every file in.github/ISSUE_TEMPLATE/and callscore.setFailedif a template references a label the workflow does not define. This fails the run instead of silently letting drift back in.js-yaml(already a project dependency) rather than a hand-rolled parser, so both YAML-sequence and comma-delimitedlabels:forms are handled correctly.require('js-yaml')resolvable inside theactions/github-scriptstep, the job now installs prod deps withnpm ci --omit=dev --ignore-scriptson Node 24.--omit=devkeeps the install lean;--ignore-scriptsis supply-chain hardening given the token-authenticated,issues: writecontext..github/ISSUE_TEMPLATE/**and to the workflow file itself, and the validation runs even when no squad roster file is present (previously an early return could skip it).Squad GitHubExpert standing rules
.squad/agents/githubexpert/charter.md: always pin Node 24 in workflows, and always rungh aw compilewhen authoring agentic workflows.Notes for reviewers
js-yamlversion bump is needed; it is an existing prod dependency and the lockfile already covers it. Verified locally thatnpm ci --omit=dev --ignore-scriptsinstalls cleanly andrequire('js-yaml')resolves from the workspace root (how github-script resolves bare module IDs)..squad/decisions/inbox/*staging files for these rules are intentionally gitignored and are not part of this PR; the charter edits are the tracked, durable change.