()
| 160 | } |
| 161 | |
| 162 | async function getEmailAsync(): Promise<string | undefined> { |
| 163 | // Only include OAuth email when actively using OAuth authentication |
| 164 | const oauthAccount = getOauthAccountInfo() |
| 165 | if (oauthAccount?.emailAddress) { |
| 166 | return oauthAccount.emailAddress |
| 167 | } |
| 168 | |
| 169 | // Ant-only fallbacks below |
| 170 | if (process.env.USER_TYPE !== 'ant') { |
| 171 | return undefined |
| 172 | } |
| 173 | |
| 174 | if (process.env.COO_CREATOR) { |
| 175 | return `${process.env.COO_CREATOR}@anthropic.com` |
| 176 | } |
| 177 | |
| 178 | return getGitEmail() |
| 179 | } |
| 180 | |
| 181 | /** |
| 182 | * Get the user's git email from `git config user.email`. |
no test coverage detected