Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions commands/bridge_auth_addtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ func newBridgeAuthAddTokenCommand() *cobra.Command {

flags.StringVarP(&options.target, "target", "t", "",
fmt.Sprintf("The target of the bridge. Valid values are [%s]", strings.Join(bridge.Targets(), ",")))
cmd.RegisterFlagCompletionFunc("target", completeFrom(bridge.Targets()))
flags.StringVarP(&options.login,
"login", "l", "", "The login in the remote bug-tracker")
flags.StringVarP(&options.user,
"user", "u", "", "The user to add the token to. Default is the current user")
cmd.RegisterFlagCompletionFunc("user", completeUser(env))

return cmd
}
Expand Down
3 changes: 2 additions & 1 deletion commands/bridge_auth_rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ func newBridgeAuthRm() *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
return runBridgeAuthRm(env, args)
},
Args: cobra.ExactArgs(1),
Args: cobra.ExactArgs(1),
ValidArgsFunction: completeBridgeAuth(env),
}

return cmd
Expand Down
3 changes: 2 additions & 1 deletion commands/bridge_auth_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ func newBridgeAuthShow() *cobra.Command {
RunE: closeBackend(env, func(cmd *cobra.Command, args []string) error {
return runBridgeAuthShow(env, args)
}),
Args: cobra.ExactArgs(1),
Args: cobra.ExactArgs(1),
ValidArgsFunction: completeBridgeAuth(env),
}

return cmd
Expand Down
1 change: 1 addition & 0 deletions commands/bridge_configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ git bug bridge configure \
flags.StringVarP(&options.name, "name", "n", "", "A distinctive name to identify the bridge")
flags.StringVarP(&options.target, "target", "t", "",
fmt.Sprintf("The target of the bridge. Valid values are [%s]", strings.Join(bridge.Targets(), ",")))
cmd.RegisterFlagCompletionFunc("target", completeFrom(bridge.Targets()))
flags.StringVarP(&options.params.URL, "url", "u", "", "The URL of the remote repository")
flags.StringVarP(&options.params.BaseURL, "base-url", "b", "", "The base URL of your remote issue tracker")
flags.StringVarP(&options.params.Login, "login", "l", "", "The login on your remote issue tracker")
Expand Down
3 changes: 2 additions & 1 deletion commands/bridge_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ func newBridgePullCommand() *cobra.Command {
RunE: closeBackend(env, func(cmd *cobra.Command, args []string) error {
return runBridgePull(env, options, args)
}),
Args: cobra.MaximumNArgs(1),
Args: cobra.MaximumNArgs(1),
ValidArgsFunction: completeBridge(env),
}

flags := cmd.Flags()
Expand Down
3 changes: 2 additions & 1 deletion commands/bridge_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ func newBridgePushCommand() *cobra.Command {
RunE: closeBackend(env, func(cmd *cobra.Command, args []string) error {
return runBridgePush(env, args)
}),
Args: cobra.MaximumNArgs(1),
Args: cobra.MaximumNArgs(1),
ValidArgsFunction: completeBridge(env),
}

return cmd
Expand Down
3 changes: 2 additions & 1 deletion commands/bridge_rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ func newBridgeRm() *cobra.Command {
RunE: closeBackend(env, func(cmd *cobra.Command, args []string) error {
return runBridgeRm(env, args)
}),
Args: cobra.ExactArgs(1),
Args: cobra.ExactArgs(1),
ValidArgsFunction: completeBridge(env),
}

return cmd
Expand Down
1 change: 1 addition & 0 deletions commands/comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func newCommentCommand() *cobra.Command {
RunE: closeBackend(env, func(cmd *cobra.Command, args []string) error {
return runComment(env, args)
}),
ValidArgsFunction: completeBug(env),
}

cmd.AddCommand(newCommentAddCommand())
Expand Down
1 change: 1 addition & 0 deletions commands/comment_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func newCommentAddCommand() *cobra.Command {
RunE: closeBackend(env, func(cmd *cobra.Command, args []string) error {
return runCommentAdd(env, options, args)
}),
ValidArgsFunction: completeBug(env),
}

flags := cmd.Flags()
Expand Down
Loading