Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bukinoshita/git-labels

Creating Github issue labels
https://github.com/bukinoshita/git-labels

git github issues labels repo repository

Last synced: 2 months ago
JSON representation

Creating Github issue labels

Awesome Lists containing this project

README

        

# git-labels [![Build Status](https://travis-ci.org/bukinoshita/git-labels.svg?branch=master)](https://travis-ci.org/bukinoshita/git-labels)

> Creating Github issue labels

## Install

```bash
$ yarn add git-labels
```

## Usage

```js
const gitLabels = require('git-labels')

const project = 'bukinoshita/git-labels'
const labels = [{ name: 'bug', color: 'cb2431' }]
const token = $token

await gitLabels({ project, labels, token })
// => Done!
```

## Why

I've been using Github issues labels a lot these days, but I never liked the default ones. So every project I have to **manually** `delete/create/update` my issues labels with the colors and names I want. This can be done with a single command using this module.



Before


After










labels names and colors are customizable.

## API

### gitLabels({ project, labels, token })

#### project

Type: `string`

Format: `org/repo`

Required

Github project.

#### labels

Type: `array`

Format: `[ { name: NAME, color: COLOR }, ... ]`

Default: [`labels.json`](https://github.com/bukinoshita/git-labels/tree/master/utils/labels.json)

Labels to be created

#### token

Type: `string`

Required

[Github access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)

## Related

- [git-labels-cli](https://github.com/bukinoshita/git-labels-cli) — CLI for this module

## License

MIT © [Bu Kinoshita](https://bukinoshita.io)