Repository navigation
Description
Summary
A newly onboarded repo's labels stay flat gray (#ededed, no description) until the next weekly sync-org-labels cron happens to run — there is currently no check anywhere in the release-PR / PR-labeler flow for whether a label already exists with the right color, and no way to sync just one repo on demand when the gap is noticed.
How it happens today
sync-pr-labels (used by both the release-PR refresh and the PR labeler) applies labels to a PR via a plain POST /issues/{n}/labels with label names — see .github/actions/github/steps/sync-pr-labels/action.mjs. It never checks whether those labels already exist in the repo. resolve-labels/compute-label-aliases only resolve aliases to canonical names against data/github-labels.json locally; no GitHub API call, no existence check either.
So on a repo where a given canonical label (type: bug, release, semver: patch, ! release → master, etc.) has never been created yet, GitHub's own POST /issues/{n}/labels silently auto-creates it — with GitHub's default gray color and an empty description, not the catalog's real color/description from data/github-labels.json. The only thing that ever fixes this is sync-org-labels, which runs on a weekly cron (Monday 06:00 UTC) plus manual dispatch from the private CLDMV/internal-github-tools repo.
Observed on CLDMV/droidsock (onboarded 2026-09-02): every v4-flow label it had touched by 2026-09-03 — type: bug, type: ci, type: config, type: documentation, type: dependencies, release, semver: patch, area: core, area: tests, ! release → master — was flat #ededed with no description, while the same names in CLDMV/.github and CLDMV/slothlet (an established, already-synced repo) carry the full catalog's real colors/descriptions. Confirms this isn't a rendering issue or a regression — sync-org-labels works correctly where it's run; droidsock just hadn't hit its first scheduled sweep.
Why a targeted, single-repo sync doesn't already exist
sync-org-labels's underlying script (.github/actions/github/jobs/sync-org-labels/sync.mjs) has no repo-scoping input at all. Its main loop is unconditional:
const allRepos = (await paginate(`/orgs/${ORG}/repos`)).sort((a, b) => a.name.localeCompare(b.name));The only input (org) selects which org to sweep, not which repos within it. So there's currently no way to say "just fix this one repo now" — it's always the full org or nothing.
Requested change
Two parts:
- Scope
sync-org-labelsto a repo list. Add arepos(orrepo) input to.github/actions/github/jobs/sync-org-labels/action.yml/sync.mjs, so the loop can target[repo]instead of always calling/orgs/{org}/repos. Keep the full-org sweep as the default when the input is empty, so the existing weekly-cron/manual-dispatch behavior frominternal-github-toolsis unaffected. - Check-and-fix at label-apply time. Somewhere in the release-PR / PR-labeler flow — most naturally right before
sync-pr-labelsapplies labels to a PR — check whether each target canonical label already exists in the repo with the catalog's color/description. When one is missing or mismatched, invoke the now-scoped single-repo sync for just that repo before (or instead of) the plainPOST.
A single-repo, self-referential sync like this doesn't have the privacy concern that keeps the org-wide dispatcher in the private internal-github-tools repo — it only ever touches and logs the repo it's already running in, so it can be wired directly into CLDMV/.github's own reusable workflows rather than needing the private repo involved.
Open design question for whoever picks this up
Whether the check-and-fix should block the release-PR/labeler run (guarantees correct colors immediately, adds a few API calls to every refresh) or fire-and-forget in the background (no latency impact, but the labels might still show gray for a few seconds/minutes after the PR updates). Either is a reasonable default; flagging it rather than presuming one.
Activity
cldmv-bot commentedon Sep 6, 2026
Closed in v4.26.0 — resolved by #266.