diff options
author | Amine Hilaly <hilalyamine@gmail.com> | 2019-05-27 19:15:53 +0200 |
---|---|---|
committer | Amine Hilaly <hilalyamine@gmail.com> | 2019-05-29 22:58:01 +0200 |
commit | aa439fae06df64883455039accfc81fa479f1a8d (patch) | |
tree | 5a0f942879cc36db38d99c2366bccc655009378d /commands/bridge_configure.go | |
parent | 5911cb96c02fdec57638fe4d49cac10b3f19e3ce (diff) | |
download | git-bug-aa439fae06df64883455039accfc81fa479f1a8d.tar.gz |
Add bridge configure documentation and examples
Diffstat (limited to 'commands/bridge_configure.go')
-rw-r--r-- | commands/bridge_configure.go | 24 |
1 files changed, 21 insertions, 3 deletions
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, } |