mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Rename "needReviewerStatus()" into "needReviewers()"
Summary: Ref T10967. The old name was because we had a `getReviewers()` tied to `needRelationships()`, rename this method to use a simpler and more clear name. Test Plan: `grep`, browsed around. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10967 Differential Revision: https://secure.phabricator.com/D17519
This commit is contained in:
parent
d179d0150c
commit
a15df4f8d5
22 changed files with 29 additions and 29 deletions
|
@ -44,7 +44,7 @@ final class DifferentialCloseConduitAPIMethod
|
|||
$revision = id(new DifferentialRevisionQuery())
|
||||
->withIDs(array($id))
|
||||
->setViewer($viewer)
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->executeOne();
|
||||
if (!$revision) {
|
||||
throw new ConduitException('ERR_NOT_FOUND');
|
||||
|
|
|
@ -47,7 +47,7 @@ final class DifferentialCreateCommentConduitAPIMethod
|
|||
$revision = id(new DifferentialRevisionQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($request->getValue('revision_id')))
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->needReviewerAuthority(true)
|
||||
->executeOne();
|
||||
if (!$revision) {
|
||||
|
|
|
@ -39,7 +39,7 @@ final class DifferentialGetCommitMessageConduitAPIMethod
|
|||
$revision = id(new DifferentialRevisionQuery())
|
||||
->withIDs(array($id))
|
||||
->setViewer($viewer)
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->needActiveDiffs(true)
|
||||
->executeOne();
|
||||
if (!$revision) {
|
||||
|
|
|
@ -42,7 +42,7 @@ final class DifferentialGetRevisionConduitAPIMethod
|
|||
$revision = id(new DifferentialRevisionQuery())
|
||||
->withIDs(array($revision_id))
|
||||
->setViewer($request->getUser())
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->executeOne();
|
||||
|
||||
if (!$revision) {
|
||||
|
|
|
@ -182,7 +182,7 @@ final class DifferentialQueryConduitAPIMethod
|
|||
$query->withBranches($branches);
|
||||
}
|
||||
|
||||
$query->needReviewerStatus(true);
|
||||
$query->needReviewers(true);
|
||||
$query->needCommitPHIDs(true);
|
||||
$query->needDiffIDs(true);
|
||||
$query->needActiveDiffs(true);
|
||||
|
|
|
@ -57,7 +57,7 @@ final class DifferentialUpdateRevisionConduitAPIMethod
|
|||
$revision = id(new DifferentialRevisionQuery())
|
||||
->setViewer($request->getUser())
|
||||
->withIDs(array($request->getValue('id')))
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->needActiveDiffs(true)
|
||||
->requireCapabilities(
|
||||
array(
|
||||
|
|
|
@ -17,7 +17,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$revision = id(new DifferentialRevisionQuery())
|
||||
->withIDs(array($this->revisionID))
|
||||
->setViewer($viewer)
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->needReviewerAuthority(true)
|
||||
->executeOne();
|
||||
if (!$revision) {
|
||||
|
@ -784,7 +784,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
->setLimit(10)
|
||||
->needFlags(true)
|
||||
->needDrafts(true)
|
||||
->needReviewerStatus(true);
|
||||
->needReviewers(true);
|
||||
|
||||
foreach ($path_map as $path => $path_id) {
|
||||
$query->withPath($repository->getID(), $path_id);
|
||||
|
|
|
@ -26,7 +26,7 @@ final class DifferentialDoorkeeperRevisionFeedStoryPublisher
|
|||
return id(new DifferentialRevisionQuery())
|
||||
->setViewer($this->getViewer())
|
||||
->withIDs(array($object->getID()))
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->executeOne();
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ final class DifferentialRevisionEditEngine
|
|||
protected function newObjectQuery() {
|
||||
return id(new DifferentialRevisionQuery())
|
||||
->needActiveDiffs(true)
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->needReviewerAuthority(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -614,7 +614,7 @@ final class DifferentialTransactionEditor
|
|||
|
||||
$new_revision = id(new DifferentialRevisionQuery())
|
||||
->setViewer($this->getActor())
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->needActiveDiffs(true)
|
||||
->withIDs(array($object->getID()))
|
||||
->executeOne();
|
||||
|
@ -1575,7 +1575,7 @@ final class DifferentialTransactionEditor
|
|||
->setViewer($this->getActor())
|
||||
->withPHIDs(array($object->getPHID()))
|
||||
->needActiveDiffs(true)
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->executeOne();
|
||||
if (!$revision) {
|
||||
throw new Exception(
|
||||
|
@ -1791,7 +1791,7 @@ final class DifferentialTransactionEditor
|
|||
// Reload to pick up the active diff and reviewer status.
|
||||
return id(new DifferentialRevisionQuery())
|
||||
->setViewer($this->getActor())
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->needActiveDiffs(true)
|
||||
->withIDs(array($object->getID()))
|
||||
->executeOne();
|
||||
|
|
|
@ -25,7 +25,7 @@ final class DifferentialHovercardEngineExtension
|
|||
$revisions = id(new DifferentialRevisionQuery())
|
||||
->setViewer($viewer)
|
||||
->withPHIDs($phids)
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->execute();
|
||||
$revisions = mpull($revisions, null, 'getPHID');
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ final class HeraldDifferentialRevisionAdapter
|
|||
$revision = id(new DifferentialRevisionQuery())
|
||||
->withIDs(array($revision->getID()))
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->executeOne();
|
||||
|
||||
$object->revision = $revision;
|
||||
|
|
|
@ -18,7 +18,7 @@ final class DifferentialRevisionMailReceiver
|
|||
return id(new DifferentialRevisionQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($id))
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->needReviewerAuthority(true)
|
||||
->needActiveDiffs(true)
|
||||
->executeOne();
|
||||
|
|
|
@ -47,7 +47,7 @@ final class DifferentialRevisionQuery
|
|||
private $needDiffIDs = false;
|
||||
private $needCommitPHIDs = false;
|
||||
private $needHashes = false;
|
||||
private $needReviewerStatus = false;
|
||||
private $needReviewers = false;
|
||||
private $needReviewerAuthority;
|
||||
private $needDrafts;
|
||||
private $needFlags;
|
||||
|
@ -283,14 +283,14 @@ final class DifferentialRevisionQuery
|
|||
|
||||
|
||||
/**
|
||||
* Set whether or not the query should load associated reviewer status.
|
||||
* Set whether or not the query should load associated reviewers.
|
||||
*
|
||||
* @param bool True to load and attach reviewers.
|
||||
* @return this
|
||||
* @task config
|
||||
*/
|
||||
public function needReviewerStatus($need_reviewer_status) {
|
||||
$this->needReviewerStatus = $need_reviewer_status;
|
||||
public function needReviewers($need_reviewers) {
|
||||
$this->needReviewers = $need_reviewers;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -429,7 +429,7 @@ final class DifferentialRevisionQuery
|
|||
$this->loadHashes($conn_r, $revisions);
|
||||
}
|
||||
|
||||
if ($this->needReviewerStatus || $this->needReviewerAuthority) {
|
||||
if ($this->needReviewers || $this->needReviewerAuthority) {
|
||||
$this->loadReviewers($conn_r, $revisions);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ final class DifferentialRevisionSearchEngine
|
|||
return id(new DifferentialRevisionQuery())
|
||||
->needFlags(true)
|
||||
->needDrafts(true)
|
||||
->needReviewerStatus(true);
|
||||
->needReviewers(true);
|
||||
}
|
||||
|
||||
protected function buildQueryFromParameters(array $map) {
|
||||
|
|
|
@ -10,7 +10,7 @@ final class DifferentialRevisionFulltextEngine
|
|||
$revision = id(new DifferentialRevisionQuery())
|
||||
->setViewer($this->getViewer())
|
||||
->withPHIDs(array($object->getPHID()))
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->executeOne();
|
||||
|
||||
// TODO: This isn't very clean, but custom fields currently rely on it.
|
||||
|
|
|
@ -478,7 +478,7 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
$reviewers = id(new DifferentialRevisionQuery())
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->withPHIDs(array($this->getPHID()))
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->executeOne()
|
||||
->getReviewerStatus();
|
||||
} else {
|
||||
|
|
|
@ -1765,7 +1765,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
->withUpdatedEpochBetween($recent, null)
|
||||
->setOrder(DifferentialRevisionQuery::ORDER_MODIFIED)
|
||||
->setLimit(10)
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->needFlags(true)
|
||||
->needDrafts(true)
|
||||
->execute();
|
||||
|
|
|
@ -190,7 +190,7 @@ final class HeraldCommitAdapter
|
|||
$revision = id(new DifferentialRevisionQuery())
|
||||
->withIDs(array($revision_id))
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->executeOne();
|
||||
if ($revision) {
|
||||
$this->affectedRevision = $revision;
|
||||
|
|
|
@ -190,7 +190,7 @@ final class HeraldPreCommitContentAdapter extends HeraldPreCommitAdapter {
|
|||
$this->revision = id(new DifferentialRevisionQuery())
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->withIDs(array($revision_id))
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->executeOne();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ final class PhabricatorRepositoryCommitOwnersWorker
|
|||
$revision = id(new DifferentialRevisionQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($revision_id))
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->executeOne();
|
||||
} else {
|
||||
$revision = null;
|
||||
|
|
|
@ -178,7 +178,7 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
|
|||
$revision_query = id(new DifferentialRevisionQuery())
|
||||
->withIDs(array($revision_id))
|
||||
->setViewer($actor)
|
||||
->needReviewerStatus(true)
|
||||
->needReviewers(true)
|
||||
->needActiveDiffs(true);
|
||||
|
||||
$revision = $revision_query->executeOne();
|
||||
|
|
Loading…
Reference in a new issue