Skip to content
master
Go to file
Code
This branch is 8 commits ahead of micnncim:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

label-exporter

GoDoc Test Status Test Coverage

Export GitHub labels in the form of YAML, JSON and table.

Installation

Create a personal access token with public_repo scope at https://github.com/settings/tokens/new and:

$ export GITHUB_TOKEN=enter_the_token_here

**Note: Github will return a 404 if you try to read from a private repo. To fix this, simply change the scope of your token to include private repos as well.

Then either download a binary release from https://github.com/micnncim/label-exporter/releases or:

$ go get github.com/micnncim/label-exporter/cmd/label-exporter

Usage

$ label-exporter --help
usage: label-exporter [<flags>] <owner> <repo>

Flags:
      --help   Show context-sensitive help (also try --help-long and --help-man).
      --debug           Enable debug mode.
  -o, --output="table"  Output format. One of: json|yaml|table - default is table

Args:
  <owner>  Owner of the repository.
  <repo>   Repository whose wanted labels.

Example

$ label-exporter micnncim label-exporter --output yaml
- color: d73a4a
  description: Something isn't working
  name: bug
- color: 0075ca
  description: Improvements or additions to documentation
  name: documentation
- color: cfd3d7
  description: This issue or pull request already exists
  name: duplicate
$ label-exporter micnncim label-exporter --output json | jq
[
  {
    "name": "bug",
    "description": "Something isn't working",
    "color": "d73a4a"
  },
  {
    "name": "documentation",
    "description": "Improvements or additions to documentation",
    "color": "0075ca"
  },
  {
    "name": "duplicate",
    "description": "This issue or pull request already exists",
    "color": "cfd3d7"
  }
]
$ label-exporter micnncim label-exporter --output table
+------------------+--------------------------------+--------+
|       NAME       |          DESCRIPTION           | COLOR  |
+------------------+--------------------------------+--------+
| bug              | Something isn't working        | d73a4a |
| documentation    | Improvements or additions to   | 0075ca |
|                  | documentation                  |        |
| duplicate        | This issue or pull request     | cfd3d7 |
|                  | already exists                 |        |
+------------------+--------------------------------+--------+

About

Exporter of GitHub labels in the form YAML, JSON and table.

Resources

Packages

No packages published
You can’t perform that action at this time.