A utility for fetching and parsing GitHub issue labels programmatically. Version 1.2.0 ships with TypeScript definitions and supports both ESM and CommonJS. Uses GitHub's API to retrieve labels for any public or private repository. Lightweight with zero runtime dependencies beyond Node.js built-ins and optional GitHub authentication via token. Differentiated by its simple API and thorough TypeScript support compared to raw octokit usage.
npm install issue-labelsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Fetches all labels from the public 'octocat/Hello-World' repo using a GitHub token from environment variable.
Provide a personal access token via the `auth` option: `{ auth: process.env.GITHUB_TOKEN }`.Ensure string matches 'owner/repository-name' pattern exactly.
Upgrade Node.js to 18+ before v2 release.
Use `import { getLabels } from 'issue-labels'` instead of `import getLabels from 'issue-labels'`.Generate a new token at https://github.com/settings/tokens with repo scope for private repos.