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

Allow "transaction.search" to be constrained by PHIDs

Summary: Depends on D19046. Ref T11330. Supports querying for specific transactions while responding to webhooks.

Test Plan: Called `transaction.search` with and without PHID constraints.

Maniphest Tasks: T11330

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

+17 -3
+17 -3
src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php
··· 22 22 protected function defineParamTypes() { 23 23 return array( 24 24 'objectIdentifier' => 'phid|string', 25 + 'constraints' => 'map<string, wild>', 25 26 ) + $this->getPagerParamTypes(); 26 27 } 27 28 ··· 66 67 $xaction_query = PhabricatorApplicationTransactionQuery::newQueryForObject( 67 68 $object); 68 69 69 - $xactions = $xaction_query 70 + $xaction_query 70 71 ->withObjectPHIDs(array($object->getPHID())) 71 - ->setViewer($viewer) 72 - ->executeWithCursorPager($pager); 72 + ->setViewer($viewer); 73 + 74 + $constraints = $request->getValue('constraints', array()); 75 + PhutilTypeSpec::checkMap( 76 + $constraints, 77 + array( 78 + 'phids' => 'optional list<string>', 79 + )); 80 + 81 + $with_phids = idx($constraints, 'phids'); 82 + if ($with_phids) { 83 + $xaction_query->withPHIDs($with_phids); 84 + } 85 + 86 + $xactions = $xaction_query->executeWithCursorPager($pager); 73 87 74 88 if ($xactions) { 75 89 $template = head($xactions)->getApplicationTransactionCommentObject();