https://github.com/scrum/git-copy-repos-labels
A iny helper to copy a list of labels from the github repository
https://github.com/scrum/git-copy-repos-labels
Last synced: 7 days ago
JSON representation
A iny helper to copy a list of labels from the github repository
- Host: GitHub
- URL: https://github.com/scrum/git-copy-repos-labels
- Owner: Scrum
- Created: 2019-08-05T12:58:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-15T15:15:24.000Z (over 6 years ago)
- Last Synced: 2026-03-31T19:54:27.626Z (3 months ago)
- Language: JavaScript
- Size: 482 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# git-copy-repos-labels
> A iny helper to copy a list of labels from the github repository
[](https://travis-ci.org/Scrum/git-copy-repos-labels)[](https://coveralls.io/r/Scrum/git-copy-repos-labels)
## Install
```bash
npm install git-copy-repos-labels
```
## Usage
```js
import gitCopyReposLabels from 'git-copy-repos-labels';
gitCopyReposLabels({
from: {
owner: 'scrum',
repo: 'git-template-labels'
},
to: {
owner: 'post',
repo: 'post-static'
},
token: '59bd8d5eb1980b7f926f2d106f4f2f0312fdf97f'
});
//=> [{id: 1479855803, node_id: 'MDU6TGFiZWwxNDc5ODU1ODAz', url: 'https://api.github.com/repos/post/post-static/labels/bug', name: 'bug', color: 'd73a4a', description: 'Something isn\'t working', default: true}, ...]
```
## API
#### `from`
Type: `Object` **`Required`**
Default: `undefined`
Description: *Github repository from copy labels.*
- #### `owner`
Type: `String` **`Required`**
Default: `undefined`
Description: *Github owner or organization name.*
- #### `repo`
Type: `String` **`Required`**
Default: `undefined`
Description: *Repository name.*
#### `to`
Type: `Object` **`Required`**
Default: `undefined`
Description: *Github repository to copy labels.*
- #### `owner`
Type: `String` **`Required`**
Default: `undefined`
Description: *Github owner or organization name.*
- #### `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)*
#### `strategy`
Type: `String`
Default: `post`
Description: *Behavior strategy for merging, deleting or updating labels*
- `post` - *Delete all labels from the repository and create from the remote repository*
- `put` - *Full update of the label when it name matches*
## Related
- [git-get-repos-id](https://github.com/Scrum/git-get-repos-id) - A tiny helper to get github repository `id`
- [git-get-repos-labels](https://github.com/Scrum/git-get-repos-labels) - A iny helper to get a list of labels from the github repository
- [git-del-repos-labels](https://github.com/Scrum/git-del-repos-labels) - A iny helper to del a list of labels from the github repository
- [git-create-repos-labels](https://github.com/Scrum/git-create-repos-labels) - A tiny helper to create of label in the github repository
- [git-update-repos-labels](https://github.com/Scrum/git-update-repos-labels) - A tiny helper to update of label in the github repository
## Recommend
- [git-template-labels](https://github.com/Scrum/git-template-labels) - Repository with a set of commonly used labels
- [git-copy-repos-labels-cli](https://github.com/Scrum/git-copy-repos-labels-cli) - CLI for git-copy-repos-labels