# ghissues

> Interact with the GitHub issues API

Latest version **2.0.14** (published 2026-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install ghissues
pnpm add ghissues
yarn add ghissues
bun add ghissues
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 2.0.14 |
| Published | 2026-10-30 |
| First published | 2014-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 1 |
| Unpacked size | 22.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 24 |
| Author | Rod Vagg |
| Maintainers | rvagg |
| Keywords | github, issues |

## Links

- npm: https://www.npmjs.com/package/ghissues
- Repository: https://github.com/rvagg/ghissues
- Issues: https://github.com/rvagg/ghissues/issues
- npm.io page: https://npm.io/package/ghissues

## Dependencies (1)

- [ghutils](https://npm.io/package/ghutils.md) ^5.0.0

## Recent versions

- 2.0.14 (latest) — 2026-10-30
- 2.0.13 — 2026-10-19
- 2.0.12 — 2026-08-05
- 2.0.11 — 2026-08-03
- 2.0.10 — 2026-08-03
- 2.0.9 — 2026-07-30
- 2.0.8 — 2026-07-29
- 2.0.7 — 2026-07-22
- 2.0.6 — 2026-07-08
- 2.0.5 — 2026-06-24
- 2.0.4 — 2026-06-22
- 2.0.3 — 2026-06-04
- 2.0.2 — 2026-04-29
- 2.0.1 — 2026-04-28
- 2.0.0 — 2026-01-27
- … 9 more at https://npm.io/package/ghissues/versions

## README

# ghissues

**A Node.js library to interact with the GitHub issues API**

[![NPM](https://nodei.co/npm/ghissues.svg?style=flat&data=n,v&color=blue)](https://nodei.co/npm/ghissues/)

## Requirements

- Node.js >= 20

## Example usage

```js
import * as ghissues from 'ghissues'

const auth = { token: 'your-github-token' }

// list all issues in a repo
const issues = await ghissues.list(auth, 'rvagg', 'jsonist')
console.log(issues)

// get issue data by number (not internal GitHub id)
const issue = await ghissues.get(auth, 'rvagg', 'nan', 123)
console.log(issue)

// create an issue
const newIssue = await ghissues.create(auth, 'rvagg', 'jsonist', {
  title: 'New issue',
  body: 'Pretty **slick** `markdown`'
})
console.log(newIssue)

// list all comments in an issue
const comments = await ghissues.listComments(auth, 'rvagg', 'jsonist', 47)
console.log(comments)

// create a comment
const comment = await ghissues.createComment(auth, 'rvagg', 'jsonist', 101, 'Whoa dude!')
console.log(comment)
```

The auth data is compatible with [ghauth](https://github.com/rvagg/ghauth) so you can connect them together:

```js
import ghauth from 'ghauth'
import * as ghissues from 'ghissues'

const auth = await ghauth({
  configName: 'issue-lister',
  scopes: ['user']
})

const issues = await ghissues.list(auth, 'rvagg', 'node-levelup')
console.log('Issues in rvagg/node-levelup:')
issues.forEach((i) => {
  console.log('#%s: %s', i.number, i.title)
})
```

## API

All methods return Promises.

### ghissues.list(auth, org, repo, options)

List all issues in a repository. Returns an array of issue objects.

### ghissues.get(auth, org, repo, num, options)

Get a single issue by number. Returns the issue object.

### ghissues.create(auth, org, repo, data, options)

Create a new issue. `data` should contain `title` and optionally `body`. Returns the created issue.

### ghissues.listComments(auth, org, repo, num, options)

List all comments on an issue. Returns an array of comment objects.

### ghissues.createComment(auth, org, repo, num, body, options)

Create a comment on an issue. Returns the created comment.

## License

**ghissues** is Copyright (c) 2014-2025 Rod Vagg [@rvagg](https://github.com/rvagg) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.

---
_Source: https://npm.io/package/ghissues · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
