1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications/diffusion/conduit/DiffusionCommitParentsQueryConduitAPIMethod.php

35 lines
792 B
PHP
Raw Normal View History

<?php
final class DiffusionCommitParentsQueryConduitAPIMethod
extends DiffusionQueryConduitAPIMethod {
public function getAPIMethodName() {
return 'diffusion.commitparentsquery';
}
public function getMethodDescription() {
return pht(
"Get the commit identifiers for a commit's parent or parents.");
}
public function defineReturnType() {
return 'list<string>';
}
protected function defineCustomParamTypes() {
return array(
'commit' => 'required string',
);
}
protected function getResult(ConduitAPIRequest $request) {
$repository = $this->getRepository($request);
return id(new DiffusionLowLevelParentsQuery())
->setRepository($repository)
->withIdentifier($request->getValue('commit'))
->execute();
}
}