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

Unfatal rendering of repository policy transactions

Summary: Fixes T4919. There's some special casing in Diffusion for CAN_PUSH right now, just accommodate that until things get more general.

Test Plan: Viewed a repository edit screen with a custom policy transaction. Clicked the link to view it.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4919

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

+8 -3
+2 -2
src/applications/repository/storage/PhabricatorRepositoryTransaction.php
··· 338 338 return pht( 339 339 '%s changed the push policy of this repository from "%s" to "%s".', 340 340 $this->renderHandleLink($author_phid), 341 - $this->renderPolicyName($old), 342 - $this->renderPolicyName($new)); 341 + $this->renderPolicyName($old, 'old'), 342 + $this->renderPolicyName($new, 'new')); 343 343 case self::TYPE_DANGEROUS: 344 344 if ($new) { 345 345 return pht(
+5
src/applications/transactions/controller/PhabricatorApplicationTransactionValueController.php
··· 27 27 // to show the details of custom policies. If / when this pathway 28 28 // supports more transaction types, rendering coding should be moved 29 29 // into PhabricatorTransactions e.g. feed rendering code. 30 + 31 + // TODO: This should be some kind of "hey do you support this?" thing on 32 + // the transactions themselves. 33 + 30 34 switch ($xaction->getTransactionType()) { 31 35 case PhabricatorTransactions::TYPE_VIEW_POLICY: 32 36 case PhabricatorTransactions::TYPE_EDIT_POLICY: 33 37 case PhabricatorTransactions::TYPE_JOIN_POLICY: 38 + case PhabricatorRepositoryTransaction::TYPE_PUSH_POLICY: 34 39 break; 35 40 default: 36 41 return new Aphront404Response();
+1 -1
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
··· 311 311 } 312 312 } 313 313 314 - private function renderPolicyName($phid, $state = 'old') { 314 + protected function renderPolicyName($phid, $state = 'old') { 315 315 $policy = PhabricatorPolicy::newFromPolicyAndHandle( 316 316 $phid, 317 317 $this->getHandleIfExists($phid));