Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15408846
D13098.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D13098.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13098: Add 'colors' and 'icons' fields to conduit api for Projects
Attached
Detach File
Event Timeline
Log In to Comment