mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
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
This commit is contained in:
parent
026e379483
commit
8c79b3eaed
1 changed files with 4 additions and 3 deletions
|
@ -106,9 +106,10 @@ final class PhabricatorRepositoryCommitOwnersWorker
|
|||
$commit_reviewedby_phid = null;
|
||||
|
||||
if ($revision_id) {
|
||||
// TODO: (T603) This is probably safe to use an omnipotent user on,
|
||||
// but check things more closely.
|
||||
$revision = id(new DifferentialRevision())->load($revision_id);
|
||||
$revision = id(new DifferentialRevisionQuery())
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->withIDs(array($revision_id))
|
||||
->executeOne();
|
||||
if ($revision) {
|
||||
$revision_author_phid = $revision->getAuthorPHID();
|
||||
$commit_reviewedby_phid = $data->getCommitDetail('reviewerPHID');
|
||||
|
|
Loading…
Reference in a new issue