@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.

Return commit information for Revision "close" and "update" transactions over the Conduit API

Summary: Depends on D19175. Ref T13099. This fills in "close" and "update" transactions so that they show which commit(s) caused the action.

Test Plan: Used `transaction.search` to query some revisions, saw commit PHID information.

Maniphest Tasks: T13099

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

+35 -1
+2 -1
src/applications/differential/engine/DifferentialDiffExtractionEngine.php
··· 284 284 ->setTransactionType($type_update) 285 285 ->setIgnoreOnNoEffect(true) 286 286 ->setNewValue($new_diff->getPHID()) 287 - ->setMetadataValue('isCommitUpdate', true); 287 + ->setMetadataValue('isCommitUpdate', true) 288 + ->setMetadataValue('commitPHIDs', array($commit->getPHID())); 288 289 289 290 foreach ($more_xactions as $more_xaction) { 290 291 $xactions[] = $more_xaction;
+19
src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php
··· 136 136 $this->renderObject()); 137 137 } 138 138 139 + public function getTransactionTypeForConduit($xaction) { 140 + return 'close'; 141 + } 142 + 143 + public function getFieldValuesForConduit($object, $data) { 144 + $commit_phid = $object->getMetadataValue('commitPHID'); 145 + 146 + if ($commit_phid) { 147 + $commit_phids = array($commit_phid); 148 + } else { 149 + $commit_phids = array(); 150 + } 151 + 152 + return array( 153 + 'commitPHIDs' => $commit_phids, 154 + ); 155 + } 156 + 157 + 139 158 }
+14
src/applications/differential/xaction/DifferentialRevisionUpdateTransaction.php
··· 182 182 } 183 183 } 184 184 185 + public function getTransactionTypeForConduit($xaction) { 186 + return 'update'; 187 + } 188 + 189 + public function getFieldValuesForConduit($object, $data) { 190 + $commit_phids = $object->getMetadataValue('commitPHIDs', array()); 191 + 192 + return array( 193 + 'old' => $object->getOldValue(), 194 + 'new' => $object->getNewValue(), 195 + 'commitPHIDs' => $commit_phids, 196 + ); 197 + } 198 + 185 199 }