@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Enrich "draft", "summary", and "testPlan" transactions from Differential in "transaction.search"

Summary:
See PHI1232, which describes a reasonable use case for wanting information about the "draft" ("Hold as Draft / Do Not Auto-Promote") flag.

Also, flesh out "testPlan" and "summary". It's possible these "blob of remarkup" fields might have metadata some day (e.g., a rendered version or a list of PHIDs or something), but we could add more keys, and we already have some other transactions which work like this.

Test Plan: Used "transaction.search" to fetch these transaction types, saw type information and metadata.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20507

+40 -7
+11
src/applications/differential/xaction/DifferentialRevisionHoldDraftTransaction.php
··· 55 55 } 56 56 } 57 57 58 + public function getTransactionTypeForConduit($xaction) { 59 + return 'draft'; 60 + } 61 + 62 + public function getFieldValuesForConduit($xaction, $data) { 63 + return array( 64 + 'old' => $xaction->getOldValue(), 65 + 'new' => $xaction->getNewValue(), 66 + ); 67 + } 68 + 58 69 }
+11
src/applications/differential/xaction/DifferentialRevisionSummaryTransaction.php
··· 61 61 pht('Summary')); 62 62 } 63 63 64 + public function getTransactionTypeForConduit($xaction) { 65 + return 'summary'; 66 + } 67 + 68 + public function getFieldValuesForConduit($xaction, $data) { 69 + return array( 70 + 'old' => $xaction->getOldValue(), 71 + 'new' => $xaction->getNewValue(), 72 + ); 73 + } 74 + 64 75 }
+11
src/applications/differential/xaction/DifferentialRevisionTestPlanTransaction.php
··· 75 75 return $errors; 76 76 } 77 77 78 + public function getTransactionTypeForConduit($xaction) { 79 + return 'testPlan'; 80 + } 81 + 82 + public function getFieldValuesForConduit($xaction, $data) { 83 + return array( 84 + 'old' => $xaction->getOldValue(), 85 + 'new' => $xaction->getNewValue(), 86 + ); 87 + } 88 + 78 89 }
+3 -3
src/applications/differential/xaction/DifferentialRevisionTitleTransaction.php
··· 59 59 return 'title'; 60 60 } 61 61 62 - public function getFieldValuesForConduit($object, $data) { 62 + public function getFieldValuesForConduit($xaction, $data) { 63 63 return array( 64 - 'old' => $object->getOldValue(), 65 - 'new' => $object->getNewValue(), 64 + 'old' => $xaction->getOldValue(), 65 + 'new' => $xaction->getNewValue(), 66 66 ); 67 67 } 68 68
+4 -4
src/applications/differential/xaction/DifferentialRevisionUpdateTransaction.php
··· 225 225 return 'update'; 226 226 } 227 227 228 - public function getFieldValuesForConduit($object, $data) { 229 - $commit_phids = $object->getMetadataValue('commitPHIDs', array()); 228 + public function getFieldValuesForConduit($xaction, $data) { 229 + $commit_phids = $xaction->getMetadataValue('commitPHIDs', array()); 230 230 231 231 return array( 232 - 'old' => $object->getOldValue(), 233 - 'new' => $object->getNewValue(), 232 + 'old' => $xaction->getOldValue(), 233 + 'new' => $xaction->getNewValue(), 234 234 'commitPHIDs' => $commit_phids, 235 235 ); 236 236 }