Fix GitHub bot avatar URL - #55297
Conversation
ChristopherBiscardi
left a comment
There was a problem hiding this comment.
Heya! thanks for the PR.
What is the source for the url construction here? Is there a github docs link that indicates this is how the urls should be handled?
|
Thanks for the review! Examples. API called during fallback: Endpoint returned by the API called during fallback: |
## Summary - Fix GitHub avatar URL generation for bot noreply commit authors - Fall back to the GitHub commit author API when the CDN email avatar endpoint cannot resolve bot noreply emails - Add tests covering bot noreply and regular user noreply author emails - Before <img width="305" height="117" alt="image" src="https://github.com/user-attachments/assets/01f79e6c-cae6-4c28-a3e3-3ca506898f4f" /> - After <img width="297" height="105" alt="image" src="https://github.com/user-attachments/assets/3f387b62-e34a-41f5-b377-2afe2e895bf8" /> ## Test Plan - `cargo test -p git_hosting_providers --features gpui/test-support` Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed GitHub avatar lookup for bot noreply commit authors. --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
## Summary - Fix GitHub avatar URL generation for bot noreply commit authors - Fall back to the GitHub commit author API when the CDN email avatar endpoint cannot resolve bot noreply emails - Add tests covering bot noreply and regular user noreply author emails - Before <img width="305" height="117" alt="image" src="https://github.com/user-attachments/assets/01f79e6c-cae6-4c28-a3e3-3ca506898f4f" /> - After <img width="297" height="105" alt="image" src="https://github.com/user-attachments/assets/3f387b62-e34a-41f5-b377-2afe2e895bf8" /> ## Test Plan - `cargo test -p git_hosting_providers --features gpui/test-support` Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed GitHub avatar lookup for bot noreply commit authors. --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
## Summary - Fix GitHub avatar URL generation for bot noreply commit authors - Fall back to the GitHub commit author API when the CDN email avatar endpoint cannot resolve bot noreply emails - Add tests covering bot noreply and regular user noreply author emails - Before <img width="305" height="117" alt="image" src="https://github.com/user-attachments/assets/01f79e6c-cae6-4c28-a3e3-3ca506898f4f" /> - After <img width="297" height="105" alt="image" src="https://github.com/user-attachments/assets/3f387b62-e34a-41f5-b377-2afe2e895bf8" /> ## Test Plan - `cargo test -p git_hosting_providers --features gpui/test-support` Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed GitHub avatar lookup for bot noreply commit authors. --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>

Summary
Fix GitHub avatar URL generation for bot noreply commit authors
Fall back to the GitHub commit author API when the CDN email avatar endpoint cannot resolve bot noreply emails
Add tests covering bot noreply and regular user noreply author emails
Before

After

Test Plan
cargo test -p git_hosting_providers --features gpui/test-supportSelf-Review Checklist:
Release Notes: