@@ -37,14 +37,15 @@ Get binaries for OS X / Linux / Windows from the latest [release].
3737Or use ` go get ` :
3838
3939```
40- go get github.com/tonglil/labeler
40+ go get -u github.com/tonglil/labeler
4141```
4242
4343[ release ] : https://github.com/tonglil/labeler/releases
4444
4545## Usage
4646
4747First, set a [ GitHub token] [ tokens ] in the environment (optional, the token can be set as an cli argument as well).
48+
4849```
4950export GITHUB_TOKEN=xxx
5051```
@@ -58,7 +59,7 @@ export GITHUB_TOKEN=xxx
5859
5960To scan existing labels from a repository and save it to a file:
6061```
61- labeler -v 5 -scan -repo owner/name labels.yaml
62+ labeler scan labels.yaml - -repo owner/name
6263```
6364
6465Which when run against a "new" repo created on GitHub, will:
@@ -75,7 +76,7 @@ And write them into `labels.yaml`, creating the file if it exists, otherwise ove
7576
7677To apply labels to a repository:
7778```
78- labeler -v 5 labels.yaml
79+ labeler apply labels.yaml --dryrun
7980```
8081
8182Where ` labels.yaml ` is like:
@@ -108,29 +109,36 @@ In this manner, this tool is idempotent.
108109# # Usage options
109110
110111```
111- usage: labeler [ <options >] <file.yaml>
112- ```
112+ $ labeler
113+ Labeler is a CLI application for managing labels on Github as code.
114+
115+ With the ability to scan and apply label changes, repository maintainers can
116+ empower contributors to submit PRs and improve the project management
117+ process/label system!
113118
114- Notable options:
115- - `-scan` - scan a repo for label information into a file
116- - `-dry-run` - show what would happen (default false)
117- - `-v <0 to 9>` - log level for V logs (default 0)
118- - `-endpoint <https://url/>` - use a different GithHub API endpoint [overrides GITHUB_API environment variable] (default "https://api.github.com/")
119- - `-repo <owner/name>` - use a different repository (default "from file")
120- - `-token <string>` - use a different GithHub token [overrides GITHUB_TOKEN environment variable]
121- - `-version` - show version
119+ Usage:
120+ labeler [ command]
122121
123- Get all options by running:
122+ Available Commands:
123+ apply Apply a YAML label definition file
124+ completion Output shell completion code for tab completion
125+ scan Save a repository's labels into a YAML definition file
126+ version Print the version information
127+
128+ Use "labeler [ command] --help" for more information about a command.
124129```
125- labeler -h
130+
131+ ## Tab completion
132+
133+ ```bash
134+ source <(labeler completion)
126135```
127136
128137## Development
129138
130139[ ` glide ` ] [ glide ] is used to manage vendor dependencies.
131140
132141Roadmap:
133- - Refactor cli (https://github.com/tonglil/labeler/issues/5).
134142- Plan -> execute (aka always dry-run first).
135143- Automatically update file after renaming operations are complete.
136144- Organizational support (apply/only-add one config to all repos in an organization).
0 commit comments