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

Function requestToken

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

Source from the content-addressed store, hash-verified

181}
182
183func 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
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.")

Callers 1

promptTokenOptionsFunction · 0.85

Calls 4

promptUserToGoToBrowserFunction · 0.85

Tested by

no test coverage detected