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

Policy - convert repository worker to query revision with policy query

Summary: Ref T7094. I guess theoretically someone could be making a commit and have just lost access to the revision and thus this could link this commit to that revision, but this all seems far fetched an weird? We also don't necessarily have the commit author's true identity since commit parsing can be a little funky to begin with. Anyhoo, functionally, this makes things no worse, but I am removing the TODO that would make us look at this in a fun way.

Test Plan: `bin/repository reparse --owners rXvalidhash` and it worked

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7094

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

+4 -3
+4 -3
src/applications/repository/worker/PhabricatorRepositoryCommitOwnersWorker.php
··· 106 106 $commit_reviewedby_phid = null; 107 107 108 108 if ($revision_id) { 109 - // TODO: (T603) This is probably safe to use an omnipotent user on, 110 - // but check things more closely. 111 - $revision = id(new DifferentialRevision())->load($revision_id); 109 + $revision = id(new DifferentialRevisionQuery()) 110 + ->setViewer(PhabricatorUser::getOmnipotentUser()) 111 + ->withIDs(array($revision_id)) 112 + ->executeOne(); 112 113 if ($revision) { 113 114 $revision_author_phid = $revision->getAuthorPHID(); 114 115 $commit_reviewedby_phid = $data->getCommitDetail('reviewerPHID');