Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14076250
D16101.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
D16101.diff
View Options
Index: src/__phutil_library_map__.php
===================================================================
--- src/__phutil_library_map__.php
+++ src/__phutil_library_map__.php
@@ -626,6 +626,7 @@
'DiffusionCommitRevisionReviewersHeraldField' => 'applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php',
'DiffusionCommitRevisionSubscribersHeraldField' => 'applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php',
'DiffusionCommitTagsController' => 'applications/diffusion/controller/DiffusionCommitTagsController.php',
+ 'DiffusionCommitTagsHeraldField' => 'applications/diffusion/herald/DiffusionCommitTagsHeraldField.php',
'DiffusionConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionConduitAPIMethod.php',
'DiffusionController' => 'applications/diffusion/controller/DiffusionController.php',
'DiffusionCreateCommentConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionCreateCommentConduitAPIMethod.php',
@@ -4907,6 +4908,7 @@
'DiffusionCommitRevisionReviewersHeraldField' => 'DiffusionCommitHeraldField',
'DiffusionCommitRevisionSubscribersHeraldField' => 'DiffusionCommitHeraldField',
'DiffusionCommitTagsController' => 'DiffusionController',
+ 'DiffusionCommitTagsHeraldField' => 'DiffusionCommitHeraldField',
'DiffusionConduitAPIMethod' => 'ConduitAPIMethod',
'DiffusionController' => 'PhabricatorController',
'DiffusionCreateCommentConduitAPIMethod' => 'DiffusionConduitAPIMethod',
Index: src/applications/diffusion/herald/DiffusionCommitTagsHeraldField.php
===================================================================
--- /dev/null
+++ src/applications/diffusion/herald/DiffusionCommitTagsHeraldField.php
@@ -0,0 +1,34 @@
+<?php
+
+final class DiffusionCommitTagsHeraldField
+ extends DiffusionCommitHeraldField {
+
+ const FIELDCONST = 'diffusion.commit.tags';
+
+ public function getHeraldFieldName() {
+ return pht('Tags');
+ }
+
+ public function getHeraldFieldValue($object) {
+ $commit = $object;
+ $repository = $object->getRepository();
+
+ $params = array(
+ 'repository' => $repository->getPHID(),
+ 'commit' => $commit->getCommitIdentifier(),
+ );
+
+ $result = id(new ConduitCall('diffusion.tagsquery', $params))
+ ->setUser(PhabricatorUser::getOmnipotentUser())
+ ->execute();
+
+ $refs = DiffusionRepositoryRef::loadAllFromDictionaries($result);
+
+ return mpull($refs, 'getShortName');
+ }
+
+ protected function getHeraldFieldStandardType() {
+ return self::STANDARD_TEXT_LIST;
+ }
+
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 4:23 PM (18 h, 9 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6775287
Default Alt Text
D16101.diff (2 KB)
Attached To
Mode
D16101: DiffusionCommitTagsHeraldField
Attached
Detach File
Event Timeline
Log In to Comment