From 8032a142232d5ab35056214df6c916b7d155b765 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 16 Jun 2016 11:50:35 -0700 Subject: [PATCH] Mark unreachable commits handles as "closed" Summary: Ref T9028. Mostly, this gives them a strikethru style. (I think this is probably the right definition of "closed" for commits. Another definition might be "audited", but I don't think completing audits really "closes" a commit.) Test Plan: {F1689662} Reviewers: chad Reviewed By: chad Maniphest Tasks: T9028 Differential Revision: https://secure.phabricator.com/D16135 --- .../repository/phid/PhabricatorRepositoryCommitPHIDType.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/repository/phid/PhabricatorRepositoryCommitPHIDType.php b/src/applications/repository/phid/PhabricatorRepositoryCommitPHIDType.php index 0f62d523d2..5d3ce3c961 100644 --- a/src/applications/repository/phid/PhabricatorRepositoryCommitPHIDType.php +++ b/src/applications/repository/phid/PhabricatorRepositoryCommitPHIDType.php @@ -46,6 +46,10 @@ final class PhabricatorRepositoryCommitPHIDType extends PhabricatorPHIDType { $handle->setFullName($full_name); $handle->setURI($commit->getURI()); $handle->setTimestamp($commit->getEpoch()); + + if ($commit->isUnreachable()) { + $handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED); + } } }