-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Fetch avatars using user id #33214
Conversation
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: ebb5e49 The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #33214 +/- ##
===========================================
+ Coverage 75.73% 75.88% +0.14%
===========================================
Files 507 507
Lines 21799 21938 +139
Branches 5343 5351 +8
===========================================
+ Hits 16509 16647 +138
Misses 4648 4648
- Partials 642 643 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very small code style suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering how we could add tests for avatar endpoints. any ideas?
I was very unsure about how to proceed with tests, but I think I can make some end-to-end cases (I found some tests for assets so I think they should be similar). I'll do them whenever I can, reverting this to draft for now. |
ac9694c
to
2cca426
Compare
Co-authored-by: Marcos Spessatto Defendi <[email protected]>
Proposed changes (including videos or screenshots)
Created a new route
<workspace>/avatar/uid/<userID>
which allows fetching avatars using the user's ID instead of just using username.This is being done to help improve performance in places where we only have access to user id. This way we avoid making an API call just to get the user's username.
This route will also return the generated SVG avatars (Initial letter with colored background) but does not allow using
@
to force returning this fallback, since a userID is expected and the fallback is based on username/name.Issue(s)
CORE-673
Steps to test or reproduce
Further comments