aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bridge/github/config.go7
-rw-r--r--bridge/launchpad/config.go5
-rw-r--r--commands/bridge_configure.go6
3 files changed, 9 insertions, 9 deletions
diff --git a/bridge/github/config.go b/bridge/github/config.go
index 2430de9c..f44be472 100644
--- a/bridge/github/config.go
+++ b/bridge/github/config.go
@@ -196,7 +196,7 @@ func promptTokenOptions(owner, project string) (string, error) {
for {
fmt.Println()
fmt.Println("[0]: user provided token")
- fmt.Println("[1]: automated token creation")
+ fmt.Println("[1]: interactive token creation")
fmt.Print("Select option: ")
line, err := bufio.NewReader(os.Stdin).ReadString('\n')
@@ -258,7 +258,6 @@ func loginAndRequestToken(owner, project string) (string, error) {
fmt.Println(" - 'repo:public_repo': to be able to read public repositories")
fmt.Println("Private:")
fmt.Println(" - 'repo' : to be able to read private repositories")
- // fmt.Println("The token will have the \"repo\" permission, giving it read/write access to your repositories and issues. There is no narrower scope available, sorry :-|")
fmt.Println()
// prompt project visibility to know the token scope needed for the repository
@@ -346,7 +345,7 @@ func promptUsername() (string, error) {
}
func promptURL(remotes map[string]string) (string, string, error) {
- validRemotes := getValideGithubRemoteURLs(remotes)
+ validRemotes := getValidGithubRemoteURLs(remotes)
if len(validRemotes) > 0 {
for {
fmt.Println("\nDetected projects:")
@@ -419,7 +418,7 @@ func splitURL(url string) (shortURL string, owner string, project string, err er
return res[0], res[1], res[2], nil
}
-func getValideGithubRemoteURLs(remotes map[string]string) []string {
+func getValidGithubRemoteURLs(remotes map[string]string) []string {
urls := make([]string, 0, len(remotes))
for _, url := range remotes {
// split url can work again with shortURL
diff --git a/bridge/launchpad/config.go b/bridge/launchpad/config.go
index c5f72c01..ef206fd5 100644
--- a/bridge/launchpad/config.go
+++ b/bridge/launchpad/config.go
@@ -92,7 +92,10 @@ func promptProjectName() (string, error) {
func validateProject(project string) (bool, error) {
url := fmt.Sprintf("%s/%s", apiRoot, project)
- resp, err := http.Get(url)
+ client := := &http.Client{
+ Timeout: defaultTimeout,
+ }
+ resp, err := client.Get(url)
if err != nil {
return false, err
}
diff --git a/commands/bridge_configure.go b/commands/bridge_configure.go
index f3f7f66f..711ceb9c 100644
--- a/commands/bridge_configure.go
+++ b/commands/bridge_configure.go
@@ -108,10 +108,8 @@ var bridgeConfigureCmd = &cobra.Command{
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.`,
+ Repository configuration can be made by passing either the --url flag or the --project and --owner flags. If the three flags are provided git-bug will use --project and --owner flags.
+ Token configuration can be directly passed with the --token flag or in the terminal prompt. If you don't already have one you can use the interactive procedure to generate one.
Example: `# For Github
git bug bridge configure \
--name=default \