# octokit-pinned-issues

> Octokit plugin to manage pinned issues for a repository

Latest version **1.0.0** (published 2018-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install octokit-pinned-issues
pnpm add octokit-pinned-issues
yarn add octokit-pinned-issues
bun add octokit-pinned-issues
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-12-16 |
| First published | 2018-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 36.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Gregor Martynus |
| Maintainers | gr2m |
| Keywords | github, octokit, plugin, pinned, issues |

## Links

- npm: https://www.npmjs.com/package/octokit-pinned-issues
- Repository: https://github.com/gr2m/octokit-pinned-issues
- Homepage: https://github.com/gr2m/octokit-pinned-issues#readme
- Issues: https://github.com/gr2m/octokit-pinned-issues/issues
- npm.io page: https://npm.io/package/octokit-pinned-issues

## Recent versions

- 1.0.0 (latest) — 2018-12-16

## README

# octokit-pinned-issues

> Octokit plugin to manage pinned issues for a repository

[![@latest](https://img.shields.io/npm/v/octokit-pinned-issues.svg)](https://www.npmjs.com/package/octokit-pinned-issues)
[![Build Status](https://travis-ci.com/gr2m/octokit-pinned-issues.svg?branch=master)](https://travis-ci.com/gr2m/octokit-pinned-issues)
[![Coverage Status](https://coveralls.io/repos/github/gr2m/octokit-pinned-issues/badge.svg)](https://coveralls.io/github/gr2m/octokit-pinned-issues)
[![Greenkeeper](https://badges.greenkeeper.io/gr2m/octokit-pinned-issues.svg)](https://greenkeeper.io/)

There is no REST API for the new ["Pinned Issues"] feature. This Octokit plugin uses GraphQL under the hood to provide simple methods to manage a repository’s pinned issues.

## Usage

```js
const Octokit = require('@octokit/rest')
  .plugin(require('octokit-pinned-issues'))

const octokit = new Octokit()

octokit.getPinnedIssues({
  owner: 'repo-name',
  repo: 'repo-name'
}).then(issues => {})
octokit.pinIssue({
  owner: 'repo-name',
  repo: 'repo-name',
  number: 123
}).then(issue => {})
octokit.unpinIssue({
  owner: 'repo-name',
  repo: 'repo-name',
  number: 123
}).then(issue => {})
```

An `issue` object can have the following properties

```js
[
  {
    id: 'MDU6SXNzdWU...',
    number: 71,
    state: 'OPEN',
    title: 'issue title',
    body: 'issue description',
    locked: false,
    active_lock_reason: null,
    milestone: {
      id: 'MDk6TWlsZXN...',
      state: 'OPEN',
      title: 'Funk',
      description: 'Get Funky!'
    },
    labels: [
      {
        id: 'MDU6TGFiZWw...',
        name: 'foo',
        description: null,
        color: 'ededed'
      }
    ],
    assignees: [
      {
        login: 'gr2m',
        id: 'MDQ6VXNlcj...',
        avatar_url: 'https://avatars3.githubusercontent.com/u/39992?v=4'
      }
    ]
  }
]
```

## LICENSE

[MIT](LICENSE)

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