Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/query/PhabricatorCommitSearchEngine.php
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | protected function buildQueryFromParameters(array $map) { | ||||
if ($map['identifiers']) { | if ($map['identifiers']) { | ||||
$query->withIdentifiers($map['identifiers']); | $query->withIdentifiers($map['identifiers']); | ||||
} | } | ||||
return $query; | return $query; | ||||
} | } | ||||
protected function buildCustomSearchFields() { | protected function buildCustomSearchFields() { | ||||
$show_packages = PhabricatorApplication::isClassInstalled( | |||||
'PhabricatorPackagesApplication'); | |||||
return array( | return array( | ||||
id(new PhabricatorSearchDatasourceField()) | id(new PhabricatorSearchDatasourceField()) | ||||
->setLabel(pht('Responsible Users')) | ->setLabel(pht('Responsible Users')) | ||||
->setKey('responsiblePHIDs') | ->setKey('responsiblePHIDs') | ||||
->setConduitKey('responsible') | ->setConduitKey('responsible') | ||||
->setAliases(array('responsible', 'responsibles', 'responsiblePHID')) | ->setAliases(array('responsible', 'responsibles', 'responsiblePHID')) | ||||
->setDatasource(new DifferentialResponsibleDatasource()) | ->setDatasource(new DifferentialResponsibleDatasource()) | ||||
->setDescription( | ->setDescription( | ||||
Show All 32 Lines | return array( | ||||
->setDatasource(new DiffusionRepositoryFunctionDatasource()) | ->setDatasource(new DiffusionRepositoryFunctionDatasource()) | ||||
->setDescription(pht('Find commits in particular repositories.')), | ->setDescription(pht('Find commits in particular repositories.')), | ||||
id(new PhabricatorSearchDatasourceField()) | id(new PhabricatorSearchDatasourceField()) | ||||
->setLabel(pht('Packages')) | ->setLabel(pht('Packages')) | ||||
->setKey('packagePHIDs') | ->setKey('packagePHIDs') | ||||
->setConduitKey('packages') | ->setConduitKey('packages') | ||||
->setAliases(array('package', 'packages', 'packagePHID')) | ->setAliases(array('package', 'packages', 'packagePHID')) | ||||
->setDatasource(new PhabricatorOwnersPackageDatasource()) | ->setDatasource(new PhabricatorOwnersPackageDatasource()) | ||||
->setIsHidden(!$show_packages) | |||||
->setDescription( | ->setDescription( | ||||
pht('Find commits which affect given packages.')), | pht('Find commits which affect given packages.')), | ||||
id(new PhabricatorSearchThreeStateField()) | id(new PhabricatorSearchThreeStateField()) | ||||
->setLabel(pht('Unreachable')) | ->setLabel(pht('Unreachable')) | ||||
->setKey('unreachable') | ->setKey('unreachable') | ||||
->setOptions( | ->setOptions( | ||||
pht('(Show All)'), | pht('(Show All)'), | ||||
pht('Show Only Unreachable Commits'), | pht('Show Only Unreachable Commits'), | ||||
▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0