From bdd248a121208d64c38b3415e3e8ed65a81c006b Mon Sep 17 00:00:00 2001 From: Lourince Daging Date: Mon, 20 Jul 2026 13:37:38 +0200 Subject: [PATCH] chore(scripts): remove orphaned github-type-label.d.mts The github-type-label.mjs implementation (plus its workflow and test) was deleted in #1088 (commit 01c315bcf) when type-labeling was consolidated into the review's own resolvePrTypeLabel/ensurePullRequestLabel path, but its hand-written .d.mts type declaration was left behind. It is the only .d.mts under scripts/ without a matching .mjs implementation, and a repo-wide search for 'github-type-label' finds no remaining references. Remove the orphan. Closes #7434 --- scripts/github-type-label.d.mts | 62 --------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 scripts/github-type-label.d.mts diff --git a/scripts/github-type-label.d.mts b/scripts/github-type-label.d.mts deleted file mode 100644 index bc1af309ef..0000000000 --- a/scripts/github-type-label.d.mts +++ /dev/null @@ -1,62 +0,0 @@ -export type TypeLabel = "gittensor:bug" | "gittensor:feature"; - -export type IssueReference = { - number?: number; - title?: string; - labels?: unknown; - pull_request?: unknown; -}; - -export type TypeLabelDecision = - | { - action: "apply"; - label: TypeLabel; - number: number; - title: string; - } - | { - action: "skip"; - reason: string; - number?: number; - title?: string; - label?: TypeLabel; - }; - -export function normalizeLabels(labels: unknown): string[]; -export function classifyTypeLabel(title: string, labels?: unknown): TypeLabel | null; -export function getTypeLabelDecision( - eventName: string, - payload: unknown, - options?: { issueReferences?: IssueReference[] }, -): TypeLabelDecision; -export function readCurrentLabels(options: { - issueLabelsUrl: string; - headers: Record; - fetchImpl?: typeof fetch; -}): Promise; -export function ensureRepositoryLabel(options: { - apiUrl?: string; - owner: string; - repo: string; - headers: Record; - label: TypeLabel; - fetchImpl?: typeof fetch; -}): Promise<{ created: boolean; reason?: string }>; -export function extractClosingIssueNumbers(text: unknown, options?: { maxCount?: number }): number[]; -export function fetchReferencedIssues(options: { - apiUrl?: string; - repository: string; - token: string; - body: unknown; - maxReferences?: number; - fetchImpl?: typeof fetch; -}): Promise; -export function applyTypeLabel(options: { - apiUrl?: string; - repository: string; - token: string; - number: number; - label: TypeLabel; - fetchImpl?: typeof fetch; -}): Promise<{ applied: boolean; reason?: string }>; -export function main(): Promise;