Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15418176
D19640.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D19640.diff
View Options
diff --git a/src/applications/audit/query/PhabricatorCommitSearchEngine.php b/src/applications/audit/query/PhabricatorCommitSearchEngine.php
--- a/src/applications/audit/query/PhabricatorCommitSearchEngine.php
+++ b/src/applications/audit/query/PhabricatorCommitSearchEngine.php
@@ -67,35 +67,48 @@
->setKey('responsiblePHIDs')
->setConduitKey('responsible')
->setAliases(array('responsible', 'responsibles', 'responsiblePHID'))
- ->setDatasource(new DifferentialResponsibleDatasource()),
+ ->setDatasource(new DifferentialResponsibleDatasource())
+ ->setDescription(
+ pht(
+ 'Find commits where given users, projects, or packages are '.
+ 'responsible for the next steps in the audit workflow.')),
id(new PhabricatorUsersSearchField())
->setLabel(pht('Authors'))
->setKey('authorPHIDs')
->setConduitKey('authors')
- ->setAliases(array('author', 'authors', 'authorPHID')),
+ ->setAliases(array('author', 'authors', 'authorPHID'))
+ ->setDescription(pht('Find commits authored by particular users.')),
id(new PhabricatorSearchDatasourceField())
->setLabel(pht('Auditors'))
->setKey('auditorPHIDs')
->setConduitKey('auditors')
->setAliases(array('auditor', 'auditors', 'auditorPHID'))
- ->setDatasource(new DiffusionAuditorFunctionDatasource()),
+ ->setDatasource(new DiffusionAuditorFunctionDatasource())
+ ->setDescription(
+ pht(
+ 'Find commits where given users, projects, or packages are '.
+ 'auditors.')),
id(new PhabricatorSearchCheckboxesField())
->setLabel(pht('Audit Status'))
->setKey('statuses')
->setAliases(array('status'))
- ->setOptions(PhabricatorAuditCommitStatusConstants::getStatusNameMap()),
+ ->setOptions(PhabricatorAuditCommitStatusConstants::getStatusNameMap())
+ ->setDescription(pht('Find commits with given audit statuses.')),
id(new PhabricatorSearchDatasourceField())
->setLabel(pht('Repositories'))
->setKey('repositoryPHIDs')
->setConduitKey('repositories')
->setAliases(array('repository', 'repositories', 'repositoryPHID'))
- ->setDatasource(new DiffusionRepositoryFunctionDatasource()),
+ ->setDatasource(new DiffusionRepositoryFunctionDatasource())
+ ->setDescription(pht('Find commits in particular repositories.')),
id(new PhabricatorSearchDatasourceField())
->setLabel(pht('Packages'))
->setKey('packagePHIDs')
->setConduitKey('packages')
->setAliases(array('package', 'packages', 'packagePHID'))
- ->setDatasource(new PhabricatorOwnersPackageDatasource()),
+ ->setDatasource(new PhabricatorOwnersPackageDatasource())
+ ->setDescription(
+ pht('Find commits which affect given packages.')),
id(new PhabricatorSearchThreeStateField())
->setLabel(pht('Unreachable'))
->setKey('unreachable')
diff --git a/src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php b/src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php
--- a/src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php
+++ b/src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php
@@ -161,7 +161,9 @@
will be applied first as a starting point, then any additional values in
`constraints` will be applied, overwriting the defaults from the original query.
-Specify constraints like this:
+Different endpoints support different constraints. The constraints this method
+supports are detailed below. As an example, you might specify constraints like
+this:
```lang=json, name="Example Custom Constraints"
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 9:19 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7716022
Default Alt Text
D19640.diff (3 KB)
Attached To
Mode
D19640: Improve some documentation for "diffusion.commit.search"
Attached
Detach File
Event Timeline
Log In to Comment