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

Make sure auditors are attached to commits on new pathways

Companion change to D19022 for commits. Mentioning and subscribing to commits
can load them without audit data.

+28
+24
src/applications/audit/editor/PhabricatorAuditEditor.php
··· 490 490 } 491 491 492 492 protected function getMailTo(PhabricatorLiskDAO $object) { 493 + $this->requireAuditors($object); 494 + 493 495 $phids = array(); 494 496 495 497 if ($object->getAuthorPHID()) { ··· 514 516 } 515 517 516 518 protected function newMailUnexpandablePHIDs(PhabricatorLiskDAO $object) { 519 + $this->requireAuditors($object); 520 + 517 521 $phids = array(); 518 522 519 523 foreach ($object->getAudits() as $auditor) { ··· 854 858 ->needAuditRequests(true) 855 859 ->needCommitData(true) 856 860 ->executeOne(); 861 + } 862 + 863 + private function requireAuditors(PhabricatorRepositoryCommit $commit) { 864 + if ($commit->hasAttachedAudits()) { 865 + return; 866 + } 867 + 868 + $with_auditors = id(new DiffusionCommitQuery()) 869 + ->setViewer($this->getActor()) 870 + ->needAuditRequests(true) 871 + ->withPHIDs(array($commit->getPHID())) 872 + ->executeOne(); 873 + if (!$with_auditors) { 874 + throw new Exception( 875 + pht( 876 + 'Failed to reload commit ("%s").', 877 + $commit->getPHID())); 878 + } 879 + 880 + $commit->attachAudits($with_auditors->getAudits()); 857 881 } 858 882 859 883 }
+4
src/applications/repository/storage/PhabricatorRepositoryCommit.php
··· 183 183 return $this->assertAttached($this->audits); 184 184 } 185 185 186 + public function hasAttachedAudits() { 187 + return ($this->audits !== self::ATTACHABLE); 188 + } 189 + 186 190 public function loadAndAttachAuditAuthority( 187 191 PhabricatorUser $viewer, 188 192 $actor_phid = null) {