Index: src/applications/project/conduit/ProjectCreateConduitAPIMethod.php =================================================================== --- src/applications/project/conduit/ProjectCreateConduitAPIMethod.php +++ src/applications/project/conduit/ProjectCreateConduitAPIMethod.php @@ -14,6 +14,9 @@ return array( 'name' => 'required string', 'members' => 'optional list', + 'icon' => 'optional string', + 'color' => 'optional string', + 'tags' => 'optional list', ); } @@ -37,6 +40,24 @@ ->setTransactionType($type_name) ->setNewValue($request->getValue('name')); + if ($request->getValue('icon')) { + $xactions[] = id(new PhabricatorProjectTransaction()) + ->setTransactionType(PhabricatorProjectTransaction::TYPE_ICON) + ->setNewValue($request->getValue('icon')); + } + + if ($request->getValue('color')) { + $xactions[] = id(new PhabricatorProjectTransaction()) + ->setTransactionType(PhabricatorProjectTransaction::TYPE_COLOR) + ->setNewValue($request->getValue('color')); + } + + if ($request->getValue('tags')) { + $xactions[] = id(new PhabricatorProjectTransaction()) + ->setTransactionType(PhabricatorProjectTransaction::TYPE_SLUGS) + ->setNewValue($request->getValue('tags')); + } + $xactions[] = id(new PhabricatorProjectTransaction()) ->setTransactionType(PhabricatorTransactions::TYPE_EDGE) ->setMetadataValue( Index: src/applications/project/conduit/ProjectQueryConduitAPIMethod.php =================================================================== --- src/applications/project/conduit/ProjectQueryConduitAPIMethod.php +++ src/applications/project/conduit/ProjectQueryConduitAPIMethod.php @@ -27,6 +27,8 @@ 'names' => 'optional list', 'phids' => 'optional list', 'slugs' => 'optional list', + 'icons' => 'optional list', + 'colors' => 'optional list', 'status' => 'optional '.$status_const, 'members' => 'optional list', @@ -71,6 +73,22 @@ $query->withSlugs($slugs); } + $request->getValue('icons'); + if ($request->getValue('icons')) { + $icons = array(); + // the internal 'fa-' prefix is a detail hidden from api clients + // but needs to pre prepended to the values in the icons array: + foreach ($request->getValue('icons') as $value) { + $icons[] = 'fa-'.$value; + } + $query->withIcons($icons); + } + + $colors = $request->getValue('colors'); + if ($colors) { + $query->withColors($colors); + } + $members = $request->getValue('members'); if ($members) { $query->withMemberPHIDs($members);