aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmine <hilalyamine@gmail.com>2019-05-26 12:35:53 +0200
committerAmine Hilaly <hilalyamine@gmail.com>2019-05-29 22:58:01 +0200
commit1022b9e5364c7f4bb8e38363b3760a3e48813047 (patch)
tree45adb2b990c15a6d7caa97ed81df303879edbd99
parent43758a14fdd42ec9b25f1fe291ec774ed67cf34e (diff)
downloadgit-bug-1022b9e5364c7f4bb8e38363b3760a3e48813047.tar.gz
Update flags descriptions
Enhance printing in prompt Co-Authored-By: Michael Muré <batolettre@gmail.com>
-rw-r--r--bridge/github/config.go4
-rw-r--r--bridge/launchpad/config.go4
-rw-r--r--commands/bridge_configure.go13
3 files changed, 11 insertions, 10 deletions
diff --git a/bridge/github/config.go b/bridge/github/config.go
index 3baafadd..7868156e 100644
--- a/bridge/github/config.go
+++ b/bridge/github/config.go
@@ -195,8 +195,8 @@ func randomFingerprint() string {
func promptTokenOptions(owner, project string) (string, error) {
for {
fmt.Println()
- fmt.Println("[0]: i have my own token")
- fmt.Println("[1]: login and generate token")
+ fmt.Println("[0]: user provided token")
+ fmt.Println("[1]: automated token creation")
fmt.Print("Select option: ")
line, err := bufio.NewReader(os.Stdin).ReadString('\n')
diff --git a/bridge/launchpad/config.go b/bridge/launchpad/config.go
index 6b299a9a..c5f72c01 100644
--- a/bridge/launchpad/config.go
+++ b/bridge/launchpad/config.go
@@ -20,10 +20,10 @@ var (
func (*Launchpad) Configure(repo repository.RepoCommon, params core.BridgeParams) (core.Configuration, error) {
if params.Token != "" {
- fmt.Println("warn: token is not needed to configure a launchpad-preview bridge")
+ fmt.Println("warning: --token is ineffective for a Launchpad bridge")
}
if params.Owner != "" {
- fmt.Println("warn: owner is not used when configuring a launchpad-preview bridge")
+ fmt.Println("warning: --owner is ineffective for a Launchpad bridge")
}
conf := make(core.Configuration)
diff --git a/commands/bridge_configure.go b/commands/bridge_configure.go
index 12f287b8..0ad602f4 100644
--- a/commands/bridge_configure.go
+++ b/commands/bridge_configure.go
@@ -113,10 +113,11 @@ var bridgeConfigureCmd = &cobra.Command{
func init() {
bridgeCmd.AddCommand(bridgeConfigureCmd)
- bridgeConfigureCmd.Flags().StringVarP(&name, "name", "n", "", "Bridge name")
- bridgeConfigureCmd.Flags().StringVarP(&target, "target", "t", "", "Bridge target name. Valid values are [github,gitlab,gitea,launchpad-preview]")
- bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.URL, "url", "u", "", "Repository url")
- bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.Owner, "owner", "o", "", "Repository owner")
- bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.Token, "token", "T", "", "Authentication token")
- bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.Project, "project", "p", "", "Repository name")
+ bridgeConfigureCmd.Flags().StringVarP(&name, "name", "n", "", "A distinctive name to identify the bridge")
+ bridgeConfigureCmd.Flags().StringVarP(&target, "target", "t", "",
+ fmt.Sprintf("The target of the bridge. Valid values are [%s]", strings.Join(bridge.Targets(), ",")))
+ 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.Project, "project", "p", "", "The name of the target repository")
}