Skip to content

Commit 1c76624

Browse files
committed
Fix help for commands and replace -h with -o for hostname
1 parent a2bc3d0 commit 1c76624

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

ghtoken

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ _ME="$(basename "${0}")"
5555
#
5656
# Manually set this to to current version of the program. Adhere to the
5757
# semantic versioning specification: http://semver.org
58-
_VERSION="0.1.0-alpha"
58+
_VERSION="0.2.0-alpha"
5959

6060
# $DEFAULT_SUBCOMMAND
6161
#
@@ -718,8 +718,8 @@ Usage:
718718
${_ME} revoke [-t|-h|<options>]
719719
720720
Options:
721-
-t | --token <token> Access token to revoke. (Required)
722-
-h | --hostname <hostname> The API URL of GitHub. (Default = api.github.com)
721+
-o <hostname>, --hostname <hostname> The API URL of GitHub. [default: api.github.com]
722+
-t <token>, --token <token> Access token to revoke. [required]
723723
724724
Description:
725725
Revoke the provided access token
@@ -736,7 +736,7 @@ revoke() {
736736
shift
737737
shift
738738
;;
739-
-h|--hostname)
739+
-o|--hostname)
740740
_hostname=${2:-}
741741
shift
742742
shift
@@ -794,15 +794,15 @@ revoke() {
794794

795795
describe "installations" <<HEREDOC
796796
Usage:
797-
${_ME} installations [-k|-b|-i|-d|-h|-j|-l|<options>]
797+
${_ME} ghtoken installations (--key <key> | -base64_key <key>) --app_id <id> [--duration <minutes>] [--hostname <hostname>] [--install_jwt_cli]
798798
799799
Options:
800-
-k | --key <key> Path to a PEM-encoded certificate and key. (Required)
801-
-b | --base64_key <key> Base64 encoded PEM certificate and key. (Optional)
802-
-i | --app_id <id> GitHub App Id. (Required)
803-
-d | --duration <duration> The duration of the token in minutes. (Default = 10)
804-
-h | --hostname <hostname> The API URL of GitHub. (Default = api.github.com)
805-
-j | --install_jwt_cli Install jwt-cli (dependency) on the current system. (Optional)
800+
-k <key>, --key <key> Path to a PEM-encoded certificate and key. [required]
801+
-b <key>, --base64_key <key> Base64 encoded PEM certificate and key. [optional]
802+
-i <id>, --app_id <id> GitHub App Id. [required]
803+
-d <minutes>, --duration <minutes> The expiration duration of the JWT in minutes. [default: 10]
804+
-o <hostname>, --hostname <hostname> The API URL of GitHub. [default: api.github.com]
805+
-j, --install_jwt_cli Install jwt-cli (dependency) on the current system. [optional]
806806
807807
Description:
808808
Generates a JWT signed with the supplied key and fetches the list of installations
@@ -959,16 +959,16 @@ installations() {
959959

960960
describe "generate" <<HEREDOC
961961
Usage:
962-
${_ME} generate [-k|-b|-i|-d|-h|-j|-l|<options>]
962+
${_ME} generate (--key <key> | --base64_key <key>) --app_id <id> [--duration <minutes>] [--installation_id <id>] [--hostname <hostname>] [--install_jwt_cli]
963963
964964
Options:
965-
-k | --key <key> Path to a PEM-encoded certificate and key. (Required)
966-
-b | --base64_key <key> Base64 encoded PEM certificate and key. (Optional)
967-
-i | --app_id <id> GitHub App Id. (Required)
968-
-d | --duration <duration> The duration of the token in minutes. (Default = 10)
969-
-h | --hostname <hostname> The API URL of GitHub. (Default = api.github.com)
970-
-j | --install_jwt_cli Install jwt-cli (dependency) on the current system. (Optional)
971-
-l | --installation_id <id> GitHub App installation id. (Default = latest id)
965+
-k <key>, --key <key> Path to a PEM-encoded certificate and key. [required]
966+
-b <key>, --base64_key <key> Base64 encoded PEM certificate and key. [optional]
967+
-i <id>, --app_id <id> GitHub App Id. [required]
968+
-d <minutes>, --duration <minutes> The expiration duration of the JWT in minutes. [default: 10]
969+
-o <hostname>, --hostname <hostname> The API URL of GitHub. [default: api.github.com]
970+
-j, --install_jwt_cli Install jwt-cli (dependency) on the current system. [optional]
971+
-l <id>, --installation_id <id> GitHub App installation id. [default = latest id]
972972
973973
Description:
974974
Generates a JWT signed with the supplied key and fetches an

0 commit comments

Comments
 (0)