commit 89a0684c8bdd9ce18167208b5f98c19b31d0be8e Author: Geoffrey Gilmore Date: Mon Jul 14 13:26:53 2025 -0700 feat(source): teams: bitbucket: enforce that username must be atlassian email address (#6585) I tried configuring a bitbucket codehost with an API token. I typed in `sourcegraph-testing` as the username, and the API token has the password. However, that didn't work and I saw this page: ![Screenshot 2025-07-14 at 12.26.03 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/5VKJ5spRdhDRvKQ0TTIe/e5b116fe-44b4-4251-b18d-ff629aa46f1b.png) https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/#Using-API-tokens-with-Bitbucket-APIs This docs page mentions that when using the API token, you need to specify your **atlassian account email** as the username. So, I adjusted the resolver to check to see if the provided username is a valid email address. I also adjusted the text on the connection page to say that you need your email address (and adjusted the input type to reflect this). ## Test plan The new account page looks like this: ![Screenshot 2025-07-14 at 1.09.59 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/5VKJ5spRdhDRvKQ0TTIe/29f0050e-fe27-4197-bcaa-3274e0d5a9b5.png) After plugging in the credentials, I see the workspaces populate the sidebar: ![Screenshot 2025-07-14 at 1.11.29 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/5VKJ5spRdhDRvKQ0TTIe/4801fa7b-2712-467e-a860-cca4f2b0fb95.png) I went back and also tried plugging an invalid email address into the connection page. Now, you can see that the input box warns the user that something is wrong with the input. Also, when I click the button the backend correctly returns an invalid parameter error ![Screenshot 2025-07-14 at 1.14.20 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/5VKJ5spRdhDRvKQ0TTIe/03d76949-dead-4b94-a5c4-aae146509142.png) ## Changelog