AuthTokenRefreshable reports whether the token is stored by gh and can be renewed with `gh auth refresh`.
(token, src string)
| 9 | // AuthTokenRefreshable reports whether the token is stored by gh and can be |
| 10 | // renewed with `gh auth refresh`. |
| 11 | func AuthTokenRefreshable(token, src string) bool { |
| 12 | return token != "" && !strings.HasSuffix(src, "_TOKEN") && strings.HasPrefix(token, "gho_") |
| 13 | } |
| 14 | |
| 15 | func AuthTokenWriteable(authCfg gh.AuthConfig, hostname string) (string, bool) { |
| 16 | token, src := authCfg.ActiveToken(hostname) |
no outgoing calls
no test coverage detected