refactor: rename label workflows and add generic uniqueness enforcement#189
Merged
Conversation
- Rename sync-squad-labels.yml → issue-labels-sync.yml - Delete squad-label-enforce.yml (hardcoded per-category logic) - Add issue-labels-enforce-unique.yml: generic enforcement for any category:value labels, reads sync file for priority ordering, exempts squad:* labels - Update doc references in 3 files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ation - Add CLOSE_LABELS: close:fixed, close:wont-fix, close:duplicate, close:question-answered - Add type:enhancement to TYPE_LABELS - Remove standalone 'bug' from SIGNAL_LABELS (replaced by type:bug) - Add migration step to rename legacy labels (bug, question, enhancement) to their type: equivalents — rename preserves issue associations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extracts migration logic into issue-labels-migrate.yml (runs daily at 07:00 UTC). Removes migration from issue-labels-sync.yml. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This reverts commit 62916ad.
This reverts commit bef5f16.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the repository’s GitHub label automation by renaming and expanding the label sync workflow, adding new workflows for legacy-label migration and category uniqueness enforcement, and modernizing several existing workflows’ action versions.
Changes:
- Added new workflows to (1) migrate legacy GitHub default labels to canonical
type:*labels and (2) enforce “one label percategory:prefix” (excludingsquad:*). - Expanded/reordered label definitions in
issue-labels-sync.yml, including newclose:*labels and a reorganizedtype:*set. - Updated multiple workflows to newer major versions of common actions.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .squad/templates/squad.agent.md.template | Updates workflow filename references from legacy sync workflow name to issue-labels-sync.yml. |
| .squad/templates/skills/init-mode/SKILL.md | Same doc/reference update for init-mode skill template. |
| .copilot/skills/init-mode/SKILL.md | Same doc/reference update for Copilot init-mode skill. |
| .github/workflows/squad-release.yml | Bumps checkout/node setup action versions for the release workflow. |
| .github/workflows/squad-preview.yml | Bumps checkout/node setup action versions for the preview validation workflow. |
| .github/workflows/squad-label-enforce.yml | Removes the legacy label-enforcement workflow (previously contained exclusivity + go/release side effects). |
| .github/workflows/squad-issue-assign.yml | Updates checkout version and keeps github-script on v8 while assigning/routing issues. |
| .github/workflows/squad-heartbeat.yml | Updates checkout and github-script versions used by the heartbeat/triage automation. |
| .github/workflows/issue-labels-sync.yml | Renames/updates label sync to include close:*, reorganize type:*, and modernize actions. |
| .github/workflows/issue-labels-migrate.yml | Adds workflow_dispatch label migration for legacy default labels → type:*. |
| .github/workflows/issue-labels-enforce-unique.yml | Adds generic uniqueness enforcement for category:value labels (excludes squad:*). |
| .github/workflows/codeql.yml | Updates checkout version used in CodeQL workflow. |
| .github/workflows/ci.yml | Updates checkout/node setup action versions for CI. |
Comments suppressed due to low confidence (1)
.github/workflows/issue-labels-sync.yml:21
actions/checkout@v6is not a valid major version for this action; update to a released major (e.g., v7) to avoid workflow failures.
petehauge
approved these changes
Jun 27, 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.
This pull request introduces significant improvements to GitHub label management workflows, modernizes action versions, and refines label automation infrastructure. The main focus is on enforcing label uniqueness, migrating legacy labels, expanding label types, and updating dependencies for better maintainability and compatibility.
Label management and automation enhancements:
.github/workflows/issue-labels-enforce-unique.ymlto enforce that only one label per category (e.g.,type:) can be applied to an issue, with exceptions forsquad:labels. The workflow determines which label to keep based on the order inissue-labels-sync.ymland removes any conflicting labels, commenting on the resolution..github/workflows/issue-labels-migrate.ymlto automate migration of legacy labels (likebug,question,enhancement,documentation) to their canonicaltype:equivalents, handling renaming, relabeling, and cleanup..github/workflows/issue-labels-sync.yml(renamed fromsync-squad-labels.yml): added newclose:labels (e.g.,close:fixed,close:wont-fix), ensured alltype:labels are present and properly ordered, and removed legacy label definitions from high-signal labels. (Must by manually triggered)Dependency and workflow modernization:
actions/checkout,actions/setup-node,actions/github-script) to their latest major versions (v6orv8) across all workflow files for improved security and compatibility.Motivation
The label management workflows had hard-coded per-category enforcement logic and naming that didn't reflect their broader purpose. Additionally, legacy GitHub default labels (
bug,question,enhancement,documentation) duplicated ourtype:*labels, causing confusion. We also lacked aclose:category to track issue closure reasons.Notes
squad-issue-assign.yml) is deferred; it requires artifact passing for the event payload