aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-04-18 23:08:51 +0200
committerTeddy Wing2018-04-18 23:08:51 +0200
commit1873a4c0d0683591269502def35948ead3c99b5d (patch)
treeb4d34df2a943d2fc42de58ac9b54e8c82d56c710
parentbdf52d9daa06b1225f4bbe893a6049b5f2123426 (diff)
downloadredprine-1873a4c0d0683591269502def35948ead3c99b5d.tar.bz2
Add a usage function
-rwxr-xr-xredprine15
1 files changed, 15 insertions, 0 deletions
diff --git a/redprine b/redprine
index 32a1445..88c4fe5 100755
--- a/redprine
+++ b/redprine
@@ -13,6 +13,21 @@ REDMINE_TOKEN=''
CACHE_FILE="$HOME/redprine.json"
+
+function print_usage () {
+ cat 1>&2 <<__EOF__
+Usage: redprine --github-token TOKEN --github-username USERNAME --redmine-base-url URL --redmine-token TOKEN
+
+Flags:
+ --github-token=TOKEN GitHub API token with pull request access.
+ --github-username=USERNAME GitHub username.
+ --redmine-base-url=URL Base Redmine URL (e.g. 'https://redmine.eaglejump.co')
+ --redmine-token=TOKEN Redmine account API key
+ -h, --help Show this help.
+ -v, --version Show application version.
+__EOF__
+}
+
function github_owner_repo () {
local git_remote=$(git remote get-url origin)
local owner_repo=$(echo "$git_remote" |