Merge pull request #140 from janckerchen/fix/github-copilot-logging

fix: support github-copilot provider in AccountInfo logging
This commit is contained in:
Luis Pater
2026-01-30 20:51:50 +08:00
committed by GitHub

View File

@@ -329,8 +329,8 @@ func (a *Auth) AccountInfo() (string, string) {
}
}
// For GitHub provider, return username
if strings.ToLower(a.Provider) == "github" {
// For GitHub provider (including github-copilot), return username
if strings.HasPrefix(strings.ToLower(a.Provider), "github") {
if a.Metadata != nil {
if username, ok := a.Metadata["username"].(string); ok {
username = strings.TrimSpace(username)