MCPcopy Index your code
hub / github.com/git-bug/git-bug / promptUserForProjectVisibility

Function promptUserForProjectVisibility

bridge/github/config.go:196–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194}
195
196func 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
212type githRespT struct {
213 uri string

Callers 1

requestTokenFunction · 0.85

Calls 2

PromptChoiceFunction · 0.92
PrintlnMethod · 0.65

Tested by

no test coverage detected