Function
resolveUsername
(authCfg gh.AuthConfig, hostname, username string)
Source from the content-addressed store, hash-verified
| 169 | } |
| 170 | |
| 171 | func resolveUsername(authCfg gh.AuthConfig, hostname, username string) string { |
| 172 | if username != "" { |
| 173 | return username |
| 174 | } |
| 175 | user, _ := authCfg.ActiveUser(hostname) |
| 176 | return user |
| 177 | } |
| 178 | |
| 179 | // getTokenReadOnly resolves the stored active token for the hostname and optional username without contacting the |
| 180 | // token endpoint. It still surfaces a refreshable credential's stored access token, so an expiring token is |
Tested by
no test coverage detected