Unified display info#65
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Users, Orgs, and teams all need to be displayed to end-users from various API requests, but up until now have often used different representations for each different place or kind.
This tries to unify them a bit by having a Unified Display Info type which we can attach to api results where needed.
When embedded in another object it will now likely be at the
displayInfokey, which is an object with akindandpayload; thekindis currently one ofuserorgorteam(though team isn't used yet).Sometimes having the display info embedded means there's some duplicate info in the response, but at least it's more consistent this way.
E.g. here's the
displayInfokey of the/accountresponse:If that user is an org it'll look like this:
Note that the org has its own info, as well as a user display info embedded within it.
Search results can return projects OR a UserLike, if the tag is
UserLikethen there'll be one of these display info's inside:E.g. here's a search response:
Test coverage
See transcripts