diff --git a/README.md b/README.md index e1113fe..e8775e3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,45 @@ # go-jira simple jira command line client in Go + +## Build + +```bash +git clone git@github.com:Netflix-Skunkworks/go-jira.git +cd go-jira +export GOPATH=$(pwd) +cd src/github.com/Netflix-Skunkworks/go-jira/jira +go get -v +go install -v +``` + +## Simple Config file + +```bash +mkdir ~/.jira.d + +cat <~/.jira.d/config.yml +endpoint: https://jira.mycompany.com +EOM +``` + +## Usage + +``` +Usage: + jira [-v ...] [-u USER] [-e URI] [-t FILE] fields + jira [-v ...] [-u USER] [-e URI] [-t FILE] ls [--query=JQL] + jira [-v ...] [-u USER] [-e URI] [-t FILE] view ISSUE + jira [-v ...] [-u USER] [-e URI] [-t FILE] ISSUE + + +General Options: + -h --help Show this usage + --version Show this version + -v --verbose Increase output logging + -u --user=USER Username to use for authenticaion (default: cbennett) + -e --endpoint=URI URI to use for jira (default: https://jira) + -t --template=FILE Template file to use for output + +List options: + -q --query=JQL Jira Query Language expression for the search +``` \ No newline at end of file diff --git a/jira/main.go b/jira/main.go index d238755..eb61d02 100644 --- a/jira/main.go +++ b/jira/main.go @@ -22,7 +22,7 @@ func parseYaml(file string, opts map[string]string) { } func loadConfigs(opts map[string]string) { - paths := cli.FindParentPaths(".jira") + paths := cli.FindParentPaths(".jira.d/config.yml") // prepend paths = append([]string{"/etc/jira-cli.yml"}, paths...) @@ -50,7 +50,7 @@ General Options: -t --template=FILE Template file to use for output List options: - -q --query=FILE Template to use for output + -q --query=JQL Jira Query Language expression for the search `, user) args, _ := docopt.Parse(usage, nil, true, "0.0.1", false, false)