add --username in the example for the commands (#9320)
* add --username in the example for the commands * update per review
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0291730c2f
Коммит
0da5c852f0
@@ -80,12 +80,12 @@ Archived channels are appended with ' (archived)'.`,
|
|||||||
}
|
}
|
||||||
|
|
||||||
var MoveChannelsCmd = &cobra.Command{
|
var MoveChannelsCmd = &cobra.Command{
|
||||||
Use: "move [team] [channels]",
|
Use: "move [team] [channels] --username [user]",
|
||||||
Short: "Moves channels to the specified team",
|
Short: "Moves channels to the specified team",
|
||||||
Long: `Moves the provided channels to the specified team.
|
Long: `Moves the provided channels to the specified team.
|
||||||
Validates that all users in the channel belong to the target team. Incoming/Outgoing webhooks are moved along with the channel.
|
Validates that all users in the channel belong to the target team. Incoming/Outgoing webhooks are moved along with the channel.
|
||||||
Channels can be specified by [team]:[channel]. ie. myteam:mychannel or by channel ID.`,
|
Channels can be specified by [team]:[channel]. ie. myteam:mychannel or by channel ID.`,
|
||||||
Example: " channel move newteam oldteam:mychannel",
|
Example: " channel move newteam oldteam:mychannel --username myusername",
|
||||||
RunE: moveChannelsCmdF,
|
RunE: moveChannelsCmdF,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,11 +99,11 @@ Channels can be specified by [team]:[channel]. ie. myteam:mychannel or by channe
|
|||||||
}
|
}
|
||||||
|
|
||||||
var ModifyChannelCmd = &cobra.Command{
|
var ModifyChannelCmd = &cobra.Command{
|
||||||
Use: "modify [channel]",
|
Use: "modify [channel] [flags] --username [user]",
|
||||||
Short: "Modify a channel's public/private type",
|
Short: "Modify a channel's public/private type",
|
||||||
Long: `Change the public/private type of a channel.
|
Long: `Change the public/private type of a channel.
|
||||||
Channel can be specified by [team]:[channel]. ie. myteam:mychannel or by channel ID.`,
|
Channel can be specified by [team]:[channel]. ie. myteam:mychannel or by channel ID.`,
|
||||||
Example: " channel modify myteam:mychannel --private",
|
Example: " channel modify myteam:mychannel --private --username myusername",
|
||||||
RunE: modifyChannelCmdF,
|
RunE: modifyChannelCmdF,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,7 +343,7 @@ func moveChannelsCmdF(command *cobra.Command, args []string) error {
|
|||||||
|
|
||||||
username, erru := command.Flags().GetString("username")
|
username, erru := command.Flags().GetString("username")
|
||||||
if erru != nil || username == "" {
|
if erru != nil || username == "" {
|
||||||
return errors.New("Username is required")
|
return errors.New("Username is required.")
|
||||||
}
|
}
|
||||||
user := getUserFromUserArg(a, username)
|
user := getUserFromUserArg(a, username)
|
||||||
|
|
||||||
@@ -473,7 +473,7 @@ func modifyChannelCmdF(command *cobra.Command, args []string) error {
|
|||||||
|
|
||||||
username, erru := command.Flags().GetString("username")
|
username, erru := command.Flags().GetString("username")
|
||||||
if erru != nil || username == "" {
|
if erru != nil || username == "" {
|
||||||
return errors.New("Username is required")
|
return errors.New("Username is required.")
|
||||||
}
|
}
|
||||||
|
|
||||||
public, _ := command.Flags().GetBool("public")
|
public, _ := command.Flags().GetBool("public")
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user