Page MenuHomePhabricator

D13098.diff
No OneTemporary

D13098.diff

diff --git a/src/applications/project/conduit/ProjectCreateConduitAPIMethod.php b/src/applications/project/conduit/ProjectCreateConduitAPIMethod.php
--- a/src/applications/project/conduit/ProjectCreateConduitAPIMethod.php
+++ b/src/applications/project/conduit/ProjectCreateConduitAPIMethod.php
@@ -14,6 +14,9 @@
return array(
'name' => 'required string',
'members' => 'optional list<phid>',
+ 'icon' => 'optional string',
+ 'color' => 'optional string',
+ 'tags' => 'optional list<string>',
);
}
@@ -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(
diff --git a/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php b/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
--- a/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
+++ b/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
@@ -27,6 +27,8 @@
'names' => 'optional list<string>',
'phids' => 'optional list<phid>',
'slugs' => 'optional list<string>',
+ 'icons' => 'optional list<string>',
+ 'colors' => 'optional list<string>',
'status' => 'optional '.$status_const,
'members' => 'optional list<phid>',
@@ -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);

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 20, 1:52 AM (1 w, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7384184
Default Alt Text
D13098.diff (2 KB)

Event Timeline