Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nunorafaelrocha committed Oct 6, 2017
1 parent 0e27bab commit 449617e
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ yarn global add ghlabels

### Basic usage

You can provide options as arguments or leave then blank and they will be asked.
You can provide options as arguments or leave then blank and they will be prompted.

```sh
ghlabels --owner foo --repo bar --token foobar --configFile ./path/somefile
Expand All @@ -36,15 +36,21 @@ Note: As an alternative you can provide options as enviroment variables (e.g. GI
### Copy from another repo

```sh
ghlabels --sourceOwner seegno --sourceRepo github-labels --targetOwner foo --targetRepo bar --token foobar
ghlabels copy --sourceOwner seegno --sourceRepo github-labels --targetOwner foo --targetRepo bar --token foobar
```

### List

```sh
ghlabels list --owner seegno --repo github-labels
```

### Client

You can also import ghlabels client and use it as a module:

```js
import { copyLabelsFromRepo, updateLabels } from 'ghlabels';
import { copyLabelsFromRepo, listLabels, updateLabels } from 'ghlabels';

// Example of copying labels from a source repo.
copyLabelsFromRepo({
Expand All @@ -53,6 +59,13 @@ copyLabelsFromRepo({
token: 'foobar'
});

// Example of listing all labels from a repo.
listLabels({
owner: 'seegno',
repo: 'github-labels',
token: 'foobar'
});

// Example of updating all labels from a repo.
updateLabels({
sourceOwner: 'seegno',
Expand Down

0 comments on commit 449617e

Please sign in to comment.