mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 17:52:43 +01:00
021223907d
Summary: Ref T7604. Remove arcanist projects from differential. Depends on D12687 and D12893. Test Plan: Submitted a diff. Patched the diff with `arc patch`. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T7604 Differential Revision: https://secure.phabricator.com/D12894
42 lines
1 KiB
PHP
42 lines
1 KiB
PHP
<?php
|
|
|
|
final class DifferentialQueryDiffsConduitAPIMethod
|
|
extends DifferentialConduitAPIMethod {
|
|
|
|
public function getAPIMethodName() {
|
|
return 'differential.querydiffs';
|
|
}
|
|
|
|
public function getMethodDescription() {
|
|
return pht('Query differential diffs which match certain criteria.');
|
|
}
|
|
|
|
protected function defineParamTypes() {
|
|
return array(
|
|
'ids' => 'optional list<uint>',
|
|
'revisionIDs' => 'optional list<uint>',
|
|
);
|
|
}
|
|
|
|
protected function defineReturnType() {
|
|
return 'list<dict>';
|
|
}
|
|
|
|
protected function execute(ConduitAPIRequest $request) {
|
|
$ids = $request->getValue('ids', array());
|
|
$revision_ids = $request->getValue('revisionIDs', array());
|
|
|
|
$diffs = array();
|
|
if ($ids || $revision_ids) {
|
|
$diffs = id(new DifferentialDiffQuery())
|
|
->setViewer($request->getUser())
|
|
->withIDs($ids)
|
|
->withRevisionIDs($revision_ids)
|
|
->needChangesets(true)
|
|
->execute();
|
|
}
|
|
|
|
return mpull($diffs, 'getDiffDict', 'getID');
|
|
}
|
|
|
|
}
|