Uh oh!
There was an error while loading. Please reload this page.
ci: standardize issue labels across org via central sync workflow - #1
ci: standardize issue labels across org via central sync workflow#1thiras wants to merge 1 commit into
Conversation
Currently each decdn org repo has its own ad-hoc label set: decdn has 29 labels (ADR, priority, scope, ...), website has 13, finance/internal/.github sit at the GH defaults. Cross-cutting concerns (security, blocked, dependencies) exist only on decdn even though they apply org-wide. Define labels declaratively in .github/labels/: a shared _core.yml and one overlay per repo. A new sync-labels workflow runs on push to labels paths or via workflow_dispatch, composing the manifest with yq and pushing to each repo via EndBug/label-sync@v2. First-run safety: delete-other-labels is false, so this PR is purely additive — adds blocked/security/dependencies to repos missing them, fills four empty descriptions on decdn (ADR/architecture/high/medium), and normalizes two label colors to lowercase. A follow-up PR flips delete-other-labels to true once orphans have been reviewed. Requires LABEL_SYNC_TOKEN repo secret with issues:write + metadata:read on all five org repos before the workflow can run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a centralized label management system for the organization, defining a core set of labels and repository-specific overlays in YAML format. It also updates CLAUDE.md with instructions for the label synchronization process. The review feedback highlights that the sync-labels.yml workflow file mentioned in the documentation is missing from the PR. Additionally, several suggestions were made to improve consistency in label naming conventions and the capitalization of language names in descriptions.
| | `.github/ISSUE_TEMPLATE/`, `.github/PULL_REQUEST_TEMPLATE.md` | Default issue/PR templates for repos without their own. | | ||
| | `workflow-templates/` | Starter workflows offered to org members in the Actions UI (these are *templates*, not workflows that run). | | ||
| | `.github/labels/*.yml` | Source of truth for issue labels org-wide. `_core.yml` applies to all repos; each `<repo>.yml` (or `dotgithub.yml` for this repo) is an overlay. | | ||
| | `.github/workflows/sync-labels.yml` | Org-management workflow that pushes the composed label manifest to each repo. Not repo-specific CI — runs from here because it operates org-wide. | |
There was a problem hiding this comment.
The workflow file .github/workflows/sync-labels.yml mentioned here is not included in this pull request. Since the PR description states that this workflow is responsible for propagating the labels to all repositories, its absence will prevent the synchronization from working as intended. Please ensure the workflow file is added to the commit.
| - name: github_actions | ||
| color: '000000' | ||
| description: Pull requests that update GitHub Actions code |
There was a problem hiding this comment.
The label name github_actions uses an underscore as a separator, which is inconsistent with other custom multi-word labels in this manifest that use hyphens (e.g., adr-review, missing-decision, poc-blocking). For consistency with the established naming convention for custom labels in this repository, consider using a hyphen.
- name: github-actionscolor: '000000'description: Pull requests that update GitHub Actions code| description: Medium priority issue | ||
| - name: rust | ||
| color: '000000' | ||
| description: Pull requests that update rust code |
| # Merged on top of _core.yml. | ||
| - name: javascript | ||
| color: '168700' | ||
| description: Pull requests that update javascript code |
There was a problem hiding this comment.
Pull request overview
This PR introduces an org-wide “source of truth” for GitHub issue labels in this .github repository and adds an automation workflow to sync those labels to the decdn organization’s repos.
Changes:
- Added a core label manifest plus per-repo overlay manifests under
.github/labels/. - Added a
sync-labelsGitHub Actions workflow that composes core+overlay and syncs labels to each target repo viaEndBug/label-sync@v2. - Updated
CLAUDE.mdto document the label manifests/workflow and the requiredLABEL_SYNC_TOKENsecret.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
CLAUDE.md | Documents the new label manifest source-of-truth and the sync workflow/secret. |
.github/workflows/sync-labels.yml | New workflow to compose core+overlay manifests and sync labels to each org repo. |
.github/labels/_core.yml | New org-wide core label set applied to all repos. |
.github/labels/decdn.yml | New label overlay for decdn/decdn. |
.github/labels/website.yml | New label overlay for decdn/website. |
.github/labels/finance.yml | New label overlay for decdn/finance. |
.github/labels/internal.yml | New label overlay for decdn/internal. |
.github/labels/dotgithub.yml | Empty overlay for decdn/.github to compose with core labels only. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| permissions: {} | ||
| jobs: | ||
| sync: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| repo: | ||
| - decdn | ||
| - website | ||
| - finance | ||
| - internal | ||
| - '.github' | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 |
| sudo wget -qO /usr/local/bin/yq \ | ||
| https://github.com/mikefarah/yq/releases/download/v4.52.4/yq_linux_amd64 | ||
| sudo chmod +x /usr/local/bin/yq |
| To change labels on any repo in the org, edit the relevant file under `.github/labels/` — never edit labels directly in the GitHub UI, they will be reverted on the next sync. | ||
| - Cross-cutting labels go in `_core.yml` (applied everywhere). | ||
| - Stack/topic labels specific to one repo go in that repo's overlay (`decdn.yml`, `website.yml`, `finance.yml`, `internal.yml`, `dotgithub.yml`). | ||
| - The sync workflow runs `EndBug/label-sync@v2` on push to `main` affecting `.github/labels/**`, or manually via the Actions tab (`workflow_dispatch`). | ||
| - **Required secret:** `LABEL_SYNC_TOKEN` — a PAT or GitHub App token with `issues:write` and `metadata:read` on all five org repos. `GITHUB_TOKEN` is scoped to this repo only and cannot mutate other repos' labels. | ||
| - `delete-other-labels` is currently `false` (additive sync). Flip to `true` only after verifying no important orphan labels remain on any target repo. |
Summary
.github/labels/(one_core.ymlshared across repos + one overlay per repo) and async-labelsworkflow that pushes the composed set to all five decdn org repos viaEndBug/label-sync@v2.delete-other-labels: false) — addsblocked/security/dependenciesto repos missing them, fills four empty descriptions ondecdn/decdn, normalizes two color cases.CLAUDE.mdto point future agents at the manifest as the source of truth.Dry-run diff (per repo, names only)
blocked,securityblocked,dependencies,economics,notebooks,parameters,securityblocked,branding,dependencies,fundraising,legal,securityblocked,dependencies,securityPrerequisite:
LABEL_SYNC_TOKENsecretGITHUB_TOKENis scoped to this repo only and cannot mutate labels on the other four repos. Before merging:issues:write+metadata:readondecdn/decdn,decdn/website,decdn/finance,decdn/internal,decdn/.github.LABEL_SYNC_TOKENondecdn/.github.mainaffecting.github/labels/**.If the secret is missing, the
EndBug/label-syncstep will fail with an auth error — safe to retry after adding the secret viagh workflow run sync-labels.yml.Follow-ups (deliberately not in this PR)
delete-other-labels: trueonce orphans have been spot-checked on each repo.ADRlabel cleanup:decdn/decdnhas bothADR(no description) andadr-review(described). They look redundant; consolidate after PR 2.critical/blockedboth#b60205;adr-review/cliboth#0e8a16;rust/github_actionsboth#000000;ADR/architecture/high/mediumall#ededed. Not addressed here to keep the diff purely additive.priority:critical/high/medium/low) deferred — would require relabeling existing issues.Test plan
LABEL_SYNC_TOKENsecret (see above)Sync issue labelsworkflow run shows green for all five matrix legsgh label list -R decdn/<repo>on at least three repos and confirm only the additions listed above appeardelete-other-labels: true🤖 Generated with Claude Code