aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authoramine <hilalyamine@gmail.com>2019-11-23 19:21:14 +0100
committeramine <hilalyamine@gmail.com>2019-11-23 19:26:27 +0100
commit09db1cda71c87d87e700eabbecf89e10a0923d43 (patch)
tree7212ba27f0bfb00d5218f3e6cf645ba4d24a6596 /commands
parent014e754fcdcd59c633e2bfc490fe34b0dcd0d89a (diff)
downloadgit-bug-09db1cda71c87d87e700eabbecf89e10a0923d43.tar.gz
commands: add bridge configure --token-id flag
Diffstat (limited to 'commands')
-rw-r--r--commands/bridge_configure.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/bridge_configure.go b/commands/bridge_configure.go
index 3562af17..6f314135 100644
--- a/commands/bridge_configure.go
+++ b/commands/bridge_configure.go
@@ -34,7 +34,8 @@ func runBridgeConfigure(cmd *cobra.Command, args []string) error {
defer backend.Close()
interrupt.RegisterCleaner(backend.Close)
- if (bridgeParams.TokenStdin || bridgeParams.Token != "") && (bridgeConfigureName == "" || bridgeConfigureTarget == "") {
+ if (bridgeParams.TokenStdin || bridgeParams.Token != "" || bridgeParams.TokenId != "") &&
+ (bridgeConfigureName == "" || bridgeConfigureTarget == "") {
return fmt.Errorf("you must provide a bridge name and target to configure a bridge with a token")
}
@@ -195,6 +196,7 @@ func init() {
bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.URL, "url", "u", "", "The URL of the target repository")
bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.Owner, "owner", "o", "", "The owner of the target repository")
bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.Token, "token", "T", "", "The authentication token for the API")
+ bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.TokenId, "token-id", "i", "", "The authentication token identifier for the API")
bridgeConfigureCmd.Flags().BoolVar(&bridgeParams.TokenStdin, "token-stdin", false, "Will read the token from stdin and ignore --token")
bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.Project, "project", "p", "", "The name of the target repository")
bridgeConfigureCmd.Flags().SortFlags = false