https://github.com/scrum/git-create-repos-labels
A tiny helper to create of label in the github repository
https://github.com/scrum/git-create-repos-labels
Last synced: 5 months ago
JSON representation
A tiny helper to create of label in the github repository
- Host: GitHub
- URL: https://github.com/scrum/git-create-repos-labels
- Owner: Scrum
- Created: 2019-08-01T14:30:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T16:40:37.000Z (over 3 years ago)
- Last Synced: 2025-10-13T08:45:56.415Z (9 months ago)
- Language: TypeScript
- Size: 842 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# git-create-repos-labels
> A iny helper to get a list of labels from the github repository
[](https://travis-ci.org/Scrum/git-create-repos-labels)[](https://coveralls.io/r/Scrum/git-create-repos-labels)
## Install
```bash
npm install git-create-repos-labels
```
## Usage
```js
import gitCreateReposLables from 'git-create-repos-labels';
const repoId = 'MDEwOlJlcG9zaXRvcnkxOTc3MjY4NTY=';
const token = '00a82e375c76ef7099c615677b7a97d0024d2465';
const label = {color: 'ff0000', name: 'test', description: 'test description'};
gitCreateReposLables({label, repoId, token});
//=> {id: 1479855803, node_id: 'MDU6TGFiZWwxNDc5ODU1ODAz', url: 'https://api.github.com/repos/post/post-static/labels/test', name: 'test', color: 'ff0000', description: 'test description', default: true}
```
## API
#### `label`
Type: `object` **`Required`**
Default: `undefined`
Description: *label creation options `{name: string, color: string, description: string}` when `{name, color}` are required*
#### `repoId`
Type: `String` **`Required`**
Default: `undefined`
Description: *Repository identificator in Github.*
#### `repo`
Type: `String` **`Required`**
Default: `undefined`
Description: *Repository name.*
#### `token`
Type: `String` **`Required`**
Default: `undefined`
Description: *You Github Personal Token. Grab it from your [Developer settings](https://github.com/settings/developers)*
## Recommend
- [git-get-repos-id](https://github.com/Scrum/git-get-repos-id) - A tiny helper to get github repository `id`