@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve some documentation for "diffusion.commit.search"

Summary:
Ref T13195. See PHI851. Start by making some minor improvements here:

- Clarify that the example of what constraints look like is just an example.
- Add descriptions for parameters missing descriptions.

Test Plan: Looked at API method page, saw more helpful/complete instructions.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13195

Differential Revision: https://secure.phabricator.com/D19640

+22 -7
+19 -6
src/applications/audit/query/PhabricatorCommitSearchEngine.php
··· 67 67 ->setKey('responsiblePHIDs') 68 68 ->setConduitKey('responsible') 69 69 ->setAliases(array('responsible', 'responsibles', 'responsiblePHID')) 70 - ->setDatasource(new DifferentialResponsibleDatasource()), 70 + ->setDatasource(new DifferentialResponsibleDatasource()) 71 + ->setDescription( 72 + pht( 73 + 'Find commits where given users, projects, or packages are '. 74 + 'responsible for the next steps in the audit workflow.')), 71 75 id(new PhabricatorUsersSearchField()) 72 76 ->setLabel(pht('Authors')) 73 77 ->setKey('authorPHIDs') 74 78 ->setConduitKey('authors') 75 - ->setAliases(array('author', 'authors', 'authorPHID')), 79 + ->setAliases(array('author', 'authors', 'authorPHID')) 80 + ->setDescription(pht('Find commits authored by particular users.')), 76 81 id(new PhabricatorSearchDatasourceField()) 77 82 ->setLabel(pht('Auditors')) 78 83 ->setKey('auditorPHIDs') 79 84 ->setConduitKey('auditors') 80 85 ->setAliases(array('auditor', 'auditors', 'auditorPHID')) 81 - ->setDatasource(new DiffusionAuditorFunctionDatasource()), 86 + ->setDatasource(new DiffusionAuditorFunctionDatasource()) 87 + ->setDescription( 88 + pht( 89 + 'Find commits where given users, projects, or packages are '. 90 + 'auditors.')), 82 91 id(new PhabricatorSearchCheckboxesField()) 83 92 ->setLabel(pht('Audit Status')) 84 93 ->setKey('statuses') 85 94 ->setAliases(array('status')) 86 - ->setOptions(PhabricatorAuditCommitStatusConstants::getStatusNameMap()), 95 + ->setOptions(PhabricatorAuditCommitStatusConstants::getStatusNameMap()) 96 + ->setDescription(pht('Find commits with given audit statuses.')), 87 97 id(new PhabricatorSearchDatasourceField()) 88 98 ->setLabel(pht('Repositories')) 89 99 ->setKey('repositoryPHIDs') 90 100 ->setConduitKey('repositories') 91 101 ->setAliases(array('repository', 'repositories', 'repositoryPHID')) 92 - ->setDatasource(new DiffusionRepositoryFunctionDatasource()), 102 + ->setDatasource(new DiffusionRepositoryFunctionDatasource()) 103 + ->setDescription(pht('Find commits in particular repositories.')), 93 104 id(new PhabricatorSearchDatasourceField()) 94 105 ->setLabel(pht('Packages')) 95 106 ->setKey('packagePHIDs') 96 107 ->setConduitKey('packages') 97 108 ->setAliases(array('package', 'packages', 'packagePHID')) 98 - ->setDatasource(new PhabricatorOwnersPackageDatasource()), 109 + ->setDatasource(new PhabricatorOwnersPackageDatasource()) 110 + ->setDescription( 111 + pht('Find commits which affect given packages.')), 99 112 id(new PhabricatorSearchThreeStateField()) 100 113 ->setLabel(pht('Unreachable')) 101 114 ->setKey('unreachable')
+3 -1
src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php
··· 161 161 will be applied first as a starting point, then any additional values in 162 162 `constraints` will be applied, overwriting the defaults from the original query. 163 163 164 - Specify constraints like this: 164 + Different endpoints support different constraints. The constraints this method 165 + supports are detailed below. As an example, you might specify constraints like 166 + this: 165 167 166 168 ```lang=json, name="Example Custom Constraints" 167 169 {