ci(issue-classifier): name every workflow, script and job after the issue it works on

Everything this stack adds now carries issue in its file name, workflow name
and job id, so one search finds all of it:

  ls .github/workflows/issue_*
  grep -ril issue scripts .github/prompts .github/*.json

Renames: label_sync.yml -> issue_label_sync.yml, label_claude_code.yml ->
issue_label_claude_code.yml, .github/labels.json -> .github/issue-labels.json,
scripts/sync-labels(.test).ts -> scripts/sync-issue-labels(.test).ts. Job ids
now match the script they run: classify-issue-tests, classify-issue,
label-issue, sync-issue-labels-tests, sync-issue-labels, label-claude-code
This commit is contained in:
ryan-crabbe-berri 2026-09-17 17:03:09 -07:00
parent 333ed01878
commit 539ac2bc01
8 changed files with 18 additions and 18 deletions

View file

@ -13,7 +13,7 @@ on:
- .github/workflows/issue_classifier.yml
- .github/prompts/issue-classifier.md
- .github/prompts/issue-classifier.schema.json
- .github/labels.json
- .github/issue-labels.json
- .github/ISSUE_TEMPLATE/bug_report.yml
- .github/ISSUE_TEMPLATE/feature_request.yml
- scripts/classify-issue.ts
@ -31,7 +31,7 @@ concurrency:
cancel-in-progress: false
jobs:
classifier-tests:
classify-issue-tests:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5

View file

@ -1,4 +1,4 @@
name: Label Claude Code issues
name: Issue label claude code
on:
issues:

View file

@ -1,11 +1,11 @@
name: Label sync
name: Issue label sync
on:
push:
branches: [main]
paths:
- .github/labels.json
- scripts/sync-labels.ts
- .github/issue-labels.json
- scripts/sync-issue-labels.ts
workflow_dispatch:
inputs:
dry_run:
@ -14,16 +14,16 @@ on:
default: true
pull_request:
paths:
- .github/workflows/label_sync.yml
- .github/labels.json
- scripts/sync-labels.ts
- scripts/sync-labels.test.ts
- .github/workflows/issue_label_sync.yml
- .github/issue-labels.json
- scripts/sync-issue-labels.ts
- scripts/sync-issue-labels.test.ts
- scripts/issue-labels.ts
permissions: {}
jobs:
sync-tests:
sync-issue-labels-tests:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5
@ -41,9 +41,9 @@ jobs:
bun-version: "1.4.0"
- name: Test the sync
run: bun test scripts/sync-labels.test.ts
run: bun test scripts/sync-issue-labels.test.ts
sync:
sync-issue-labels:
if: github.event_name != 'pull_request' && github.repository == 'BerriAI/litellm'
runs-on: ubuntu-latest
timeout-minutes: 5
@ -65,8 +65,8 @@ jobs:
# Exact version, never latest: the next step holds an issues: write token
bun-version: "1.4.0"
- name: Create or recolour every label in .github/labels.json
run: bun run scripts/sync-labels.ts
- name: Create or recolour every label in .github/issue-labels.json
run: bun run scripts/sync-issue-labels.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run == true }}

View file

@ -1,4 +1,4 @@
import manifest from "../.github/labels.json";
import manifest from "../.github/issue-labels.json";
export const NAMESPACES = ["domain", "provider", "kind", "priority", "lift", "needs"] as const;
export type Namespace = (typeof NAMESPACES)[number];

View file

@ -97,7 +97,7 @@ export function parseVerdict(raw: string): ParsedVerdict {
const known = new Set(manifestLabels(MANIFEST).map((label) => label.name));
const unknown = desiredLabels(verdict).filter((label) => !known.has(label));
if (unknown.length > 0) {
return { kind: "invalid", reason: `not in .github/labels.json: ${unknown.join(", ")}` };
return { kind: "invalid", reason: `not in .github/issue-labels.json: ${unknown.join(", ")}` };
}
return { kind: "verdict", verdict };
}

View file

@ -2,7 +2,7 @@ import { describe, expect, test } from "bun:test";
import type { GitHubApi } from "./auto-close-duplicates";
import { MANIFEST, manifestLabels, type Manifest } from "./issue-labels";
import { readConfig, syncLabels, syncPlan, type GitHubLabel } from "./sync-labels";
import { readConfig, syncLabels, syncPlan, type GitHubLabel } from "./sync-issue-labels";
const small: Manifest = {
domain: { caching: { color: "1C6E5B", description: "Response cache" } },