import type { Label } from "gitea-js"; import type { GiteaClient } from "./client.js"; import type { RepoContext } from "./context.js"; import { axiError, classifyHttpError } from "./errors.js"; import { fetchAllPages } from "./paginate.js"; /** * Name→ID resolution for the Gitea endpoints that only accept numeric ids. * Shared by every command that takes a `--label` or `--milestone` name. */ /** Fetch every label in the repository, paging until the API runs out. */ async function listAllLabels(api: GiteaClient, context: RepoContext): Promise { try { const { items } = await fetchAllPages