From ef13b0e52b465c985bcf8fa91fc8bb686688cf47 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 6 Jul 2016 19:10:50 -0700 Subject: [PATCH] Expose repository "importing" flag via diffusion.repository.search Summary: See Z2352#28072. Expose this flag to allow callers to take actions after an import finishes, which is generally reasonable. Test Plan: Ran query from console, saw `isImporting` flag in results. Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D16247 --- .../repository/storage/PhabricatorRepository.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index 4a7e3d4681..654ea42c3e 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -2400,6 +2400,12 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO ->setKey('status') ->setType('string') ->setDescription(pht('Active or inactive status.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('isImporting') + ->setType('bool') + ->setDescription( + pht( + 'True if the repository is importing initial commits.')), ); } @@ -2410,6 +2416,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO 'callsign' => $this->getCallsign(), 'shortName' => $this->getRepositorySlug(), 'status' => $this->getStatus(), + 'isImporting' => (bool)$this->isImporting(), ); }