()
| 194 | } |
| 195 | |
| 196 | func promptUserForProjectVisibility() (string, error) { |
| 197 | fmt.Println("git-bug will now generate an access token in your Github profile. The token is stored in the global git config.") |
| 198 | fmt.Println() |
| 199 | fmt.Println("The access scope depend on the type of repository.") |
| 200 | fmt.Println("Public:") |
| 201 | fmt.Println(" - 'public_repo': to be able to read public repositories") |
| 202 | fmt.Println("Private:") |
| 203 | fmt.Println(" - 'repo' : to be able to read private repositories") |
| 204 | fmt.Println() |
| 205 | index, err := input.PromptChoice("repository visibility", []string{"public", "private"}) |
| 206 | if err != nil { |
| 207 | return "", err |
| 208 | } |
| 209 | return []string{"public_repo", "repo"}[index], nil |
| 210 | } |
| 211 | |
| 212 | type githRespT struct { |
| 213 | uri string |
no test coverage detected