- The icon CSS tag is transformed through the new function PhabricatorProjectIcon::getAPIName($key), which returns a name without fa-.
- Color is a trivial lookup
- Profile image returns the PHID or null if not available
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T6501: Expose project icons and other metadata through project.query
- Commits
- Restricted Diffusion Commit
rPce55bb1d9630: Add icon, color and profile image to project.query - Required Signatures
L28 Phacility Individual Contributor License Agreement
- Create two projects, with different icon and color, one with and one without profile image.
- Request information on both using project.query
Then:
- Confirm icon and colors are correct for both projects
- Confirm image PHID is correct
- Confirm image PHID is null for the project without image
Diff Detail
- Repository
- rP Phabricator
- Branch
- master
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 3006 Build 3010: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
One minor inline, looks good otherwise.
src/applications/project/conduit/ProjectConduitAPIMethod.php | ||
---|---|---|
32 | Let's call this profileImagePHID to disambiguate it from, e.g., profileImageURI. |
I have opted for
"profileImage" : { "phid" : "PHID-FILE-w5kjphncwdhjgyazny6j" },
instead, as that will allow
"profileImage" : { "phid" : "PHID-FILE-w5kjphncwdhjgyazny6j", "uri": "some/uri", "50x50": "some/other/uri" },
etc in the future instead of
"profileImagePHID" : "PHID-FILE-w5kjphncwdhjgyazny6j", "profileImageURI": "some/uri", "profileImage50x50URI": "some/other/uri"
Let's just do profileImagePHID instead of the sub-array, this is more consistent with lotsOfOtherStuffPHID in modern calls.
Specifically, it's unlikely (but possible) that we'll add profileImageURI here, but profileImagePHID makes it clear that the value isn't a URI, like authorPHID makes it clear that the value isn't a username and activeDiffPHID makes it clear that the value isn't a vanilla ID, in a call like differential.query. This is super nitpicky overall but annotating PHID fields with ...PHID just improves consistency and clarity a little bit.