(token string)
| 339 | var knownTokenPrefixes = []string{"github_pat_", "ghp_", "gho_", "ghu_", "ghs_", "ghr_"} |
| 340 | |
| 341 | func maskToken(token string) string { |
| 342 | for _, prefix := range knownTokenPrefixes { |
| 343 | if strings.HasPrefix(token, prefix) { |
| 344 | return prefix + strings.Repeat("*", len(token)-len(prefix)) |
| 345 | } |
| 346 | } |
| 347 | return strings.Repeat("*", len(token)) |
| 348 | } |
| 349 | |
| 350 | func displayScopes(scopes string) string { |
| 351 | if scopes == "" { |
no outgoing calls