Page MenuHomePhabricator

Add icon, color and profile image to project.query

Authored by valhallasw on Nov 9 2014, 6:30 PM.
Referenced Files
F11024428: D10823.diff
Fri, Aug 12, 7:20 AM
Unknown Object (File)
Tue, Aug 9, 12:54 PM
Unknown Object (File)
Tue, Aug 2, 3:04 PM
Unknown Object (File)
Sun, Jul 17, 11:00 AM
Unknown Object (File)
Jun 13 2022, 5:49 AM
Unknown Object (File)
Jun 10 2022, 7:09 AM
Unknown Object (File)
Jun 6 2022, 6:56 PM
Unknown Object (File)
May 26 2022, 8:08 PM


  • 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
Test Plan
  • Create two projects, with different icon and color, one with and one without profile image.
  • Request information on both using project.query


  • 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

rP Phabricator
Lint Not Applicable
Tests Not Applicable

Event Timeline

valhallasw retitled this revision from to Add icon, color and profile image to project.query.
valhallasw updated this object.
valhallasw edited the test plan for this revision. (Show Details)
valhallasw added a reviewer: epriestley.
valhallasw added subscribers: legoktm, yuvipanda.
epriestley edited edge metadata.

One minor inline, looks good otherwise.


Let's call this profileImagePHID to disambiguate it from, e.g., profileImageURI.

This revision now requires changes to proceed.Nov 9 2014, 6:37 PM
valhallasw edited edge metadata.

Use sub-array with phid key for profileImage

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.

valhallasw edited edge metadata.

profileImagePHID it is

epriestley edited edge metadata.

Cool, thanks!

This revision is now accepted and ready to land.Nov 9 2014, 7:36 PM
This revision was automatically updated to reflect the committed changes.