mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
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
This commit is contained in:
parent
0120388a75
commit
2592bfcbb3
1 changed files with 7 additions and 0 deletions
|
@ -113,6 +113,10 @@ final class PhabricatorCommitSearchEngine
|
||||||
|
|
||||||
$names['open'] = pht('Open Audits');
|
$names['open'] = pht('Open Audits');
|
||||||
|
|
||||||
|
if ($this->requireViewer()->isLoggedIn()) {
|
||||||
|
$names['authored'] = pht('Authored Commits');
|
||||||
|
}
|
||||||
|
|
||||||
$names['all'] = pht('All Commits');
|
$names['all'] = pht('All Commits');
|
||||||
|
|
||||||
return $names;
|
return $names;
|
||||||
|
@ -140,6 +144,9 @@ final class PhabricatorCommitSearchEngine
|
||||||
'auditorPHIDs',
|
'auditorPHIDs',
|
||||||
PhabricatorAuditCommentEditor::loadAuditPHIDsForUser($viewer));
|
PhabricatorAuditCommentEditor::loadAuditPHIDsForUser($viewer));
|
||||||
return $query;
|
return $query;
|
||||||
|
case 'authored':
|
||||||
|
$query->setParameter('commitAuthorPHIDs', array($viewer->getPHID()));
|
||||||
|
return $query;
|
||||||
case 'problem':
|
case 'problem':
|
||||||
$query->setParameter('commitAuthorPHIDs', array($viewer->getPHID()));
|
$query->setParameter('commitAuthorPHIDs', array($viewer->getPHID()));
|
||||||
$query->setParameter(
|
$query->setParameter(
|
||||||
|
|
Loading…
Reference in a new issue