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