()
| 181 | } |
| 182 | |
| 183 | func requestToken() (string, error) { |
| 184 | scope, err := promptUserForProjectVisibility() |
| 185 | if err != nil { |
| 186 | return "", errors.WithStack(err) |
| 187 | } |
| 188 | resp, err := requestUserVerificationCode(scope) |
| 189 | if err != nil { |
| 190 | return "", err |
| 191 | } |
| 192 | promptUserToGoToBrowser(resp.uri, resp.userCode) |
| 193 | return pollGithubForAuthorization(resp.deviceCode, resp.interval) |
| 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.") |
no test coverage detected