From aa439fae06df64883455039accfc81fa479f1a8d Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Mon, 27 May 2019 19:15:53 +0200 Subject: Add bridge configure documentation and examples --- commands/bridge_configure.go | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'commands/bridge_configure.go') diff --git a/commands/bridge_configure.go b/commands/bridge_configure.go index c1bea08b..f3f7f66f 100644 --- a/commands/bridge_configure.go +++ b/commands/bridge_configure.go @@ -57,7 +57,7 @@ func runBridgeConfigure(cmd *cobra.Command, args []string) error { return err } - fmt.Println("successfully configured bridge") + fmt.Printf("Successfully configured bridge: %s\n", name) return nil } @@ -105,8 +105,26 @@ func promptName() (string, error) { } var bridgeConfigureCmd = &cobra.Command{ - Use: "configure", - Short: "Configure a new bridge.", + Use: "configure", + Short: "Configure a new bridge.", + Long: ` Configure a new bridge by passing flags or/and using interactive terminal prompts. You can avoid all the terminal prompts by passing all the necessary flags to configure your bridge. + Repository configuration can be made by passing or the --url flag or the --project and/or --owner flags. If the three flags are provided git-bug will use --project and --owner flags. + Token configuration can be made by passing it in the --token flag or in the terminal prompt. If you don't already have one you can use terminal prompt to login and generate it directly. + For Github and Gitlab bridges, git-bug need a token to export and import issues, comments and editions for public and private repositories. + For Launchpad bridges, git-bug for now supports only public repositories and you only need --project or --url flag to configure it.`, + Example: `# For Github +git bug bridge configure \ + --name=default \ + --target=github \ + --owner=$(OWNER) \ + --project=$(PROJECT) \ + --token=$(TOKEN) + +# For Launchpad +git bug bridge configure \ + --name=default \ + --target=launchpad-preview \ + --url=https://bugs.launchpad.net/ubuntu/`, PreRunE: loadRepo, RunE: runBridgeConfigure, } -- cgit