aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bridge_configure.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/bridge_configure.go')
-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