Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/query/PhabricatorCommitSearchEngine.php
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | protected function buildQueryFromParameters(array $map) { | ||||
if ($map['unreachable'] !== null) { | if ($map['unreachable'] !== null) { | ||||
$query->withUnreachable($map['unreachable']); | $query->withUnreachable($map['unreachable']); | ||||
} | } | ||||
if ($map['ancestorsOf']) { | if ($map['ancestorsOf']) { | ||||
$query->withAncestorsOf($map['ancestorsOf']); | $query->withAncestorsOf($map['ancestorsOf']); | ||||
} | } | ||||
if ($map['identifiers']) { | |||||
$query->withIdentifiers($map['identifiers']); | |||||
} | |||||
return $query; | return $query; | ||||
} | } | ||||
protected function buildCustomSearchFields() { | protected function buildCustomSearchFields() { | ||||
return array( | return array( | ||||
id(new PhabricatorSearchDatasourceField()) | id(new PhabricatorSearchDatasourceField()) | ||||
->setLabel(pht('Responsible Users')) | ->setLabel(pht('Responsible Users')) | ||||
->setKey('responsiblePHIDs') | ->setKey('responsiblePHIDs') | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | return array( | ||||
'any branch, tag, or ref.')), | 'any branch, tag, or ref.')), | ||||
id(new PhabricatorSearchStringListField()) | id(new PhabricatorSearchStringListField()) | ||||
->setLabel(pht('Ancestors Of')) | ->setLabel(pht('Ancestors Of')) | ||||
->setKey('ancestorsOf') | ->setKey('ancestorsOf') | ||||
->setDescription( | ->setDescription( | ||||
pht( | pht( | ||||
'Find commits which are ancestors of a particular ref, '. | 'Find commits which are ancestors of a particular ref, '. | ||||
'like "master".')), | 'like "master".')), | ||||
id(new PhabricatorSearchStringListField()) | |||||
->setLabel(pht('Identifiers')) | |||||
->setKey('identifiers') | |||||
->setDescription( | |||||
pht( | |||||
'Find commits with particular identifiers (usually, hashes). '. | |||||
'Supports full or partial identifiers (like "abcd12340987..." or '. | |||||
'"abcd1234") and qualified or unqualified identifiers (like '. | |||||
'"rXabcd1234" or "abcd1234").')), | |||||
); | ); | ||||
} | } | ||||
protected function getURI($path) { | protected function getURI($path) { | ||||
return '/diffusion/commit/'.$path; | return '/diffusion/commit/'.$path; | ||||
} | } | ||||
protected function getBuiltinQueryNames() { | protected function getBuiltinQueryNames() { | ||||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |