From 2592bfcbb3018e65df270f2ebc8f7cde40abf908 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 13 May 2014 08:06:22 -0700 Subject: [PATCH] Add an "authored commits" prebuilt filter to Audit Summary: Add a prebuilt filter to show all of the viewer's commits across all repositories. I could go either way on this, but it seems maybe-useful (?), and we have similar prebuilt filters elsewhere. Test Plan: scoped it out <.< >.> Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D8881 --- .../audit/query/PhabricatorCommitSearchEngine.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/applications/audit/query/PhabricatorCommitSearchEngine.php b/src/applications/audit/query/PhabricatorCommitSearchEngine.php index a24a11a7f1..837e665824 100644 --- a/src/applications/audit/query/PhabricatorCommitSearchEngine.php +++ b/src/applications/audit/query/PhabricatorCommitSearchEngine.php @@ -113,6 +113,10 @@ final class PhabricatorCommitSearchEngine $names['open'] = pht('Open Audits'); + if ($this->requireViewer()->isLoggedIn()) { + $names['authored'] = pht('Authored Commits'); + } + $names['all'] = pht('All Commits'); return $names; @@ -140,6 +144,9 @@ final class PhabricatorCommitSearchEngine 'auditorPHIDs', PhabricatorAuditCommentEditor::loadAuditPHIDsForUser($viewer)); return $query; + case 'authored': + $query->setParameter('commitAuthorPHIDs', array($viewer->getPHID())); + return $query; case 'problem': $query->setParameter('commitAuthorPHIDs', array($viewer->getPHID())); $query->setParameter(