Automattic / vip-go-compatibility-scanner

Scan for compatibility problems in repository code using PHPCS with any standard, report as GitHub issues.
5 stars 1 forks source link

User search needs to check for exact email match #7

Closed andrewfleming closed 4 years ago

andrewfleming commented 4 years ago

https://github.com/Automattic/vip-go-compatibility-scanner/blob/92a0b7084818053727328964c8aeea92c8dd9c34/zendesk-api.php#L90

The Zendesk user search can return multiple results and we cannot assume the first result is the correct result. We should add logic to confirm the email address matches the email we're searching for.

I used the existing logic to create a ticket via the API, and the ticket was assigned to one of our customer's developers with the same name as me 😬

gudmdharalds commented 4 years ago

Thank you for identifying the problem, as well as opening this issue and PR #8. I will have a closer look and merge.