From e15b3dd3c610923f198ec11f604bbbfc105d776e Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 22 Mar 2019 09:06:10 -0700 Subject: [PATCH] When a repository is inactive, mark its handle as "closed" Summary: See downstream . We currently don't mark repository handles as closed. Test Plan: Mentioned two repositories with `R1` (active) and `R2` (inactive). After patch, saw `R2` visually indicated as closed/inactive. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20309 --- .../phid/PhabricatorRepositoryRepositoryPHIDType.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/repository/phid/PhabricatorRepositoryRepositoryPHIDType.php b/src/applications/repository/phid/PhabricatorRepositoryRepositoryPHIDType.php index ba78b0fe7a..6ca67257cf 100644 --- a/src/applications/repository/phid/PhabricatorRepositoryRepositoryPHIDType.php +++ b/src/applications/repository/phid/PhabricatorRepositoryRepositoryPHIDType.php @@ -46,6 +46,10 @@ final class PhabricatorRepositoryRepositoryPHIDType ->setFullName("{$monogram} {$name}") ->setURI($uri) ->setMailStampName($monogram); + + if ($repository->getStatus() !== PhabricatorRepository::STATUS_ACTIVE) { + $handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED); + } } }