Differential D12380 Diff 29771 src/applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php
<?php | <?php | ||||
final class DifferentialParseCommitMessageConduitAPIMethod | final class DifferentialParseCommitMessageConduitAPIMethod | ||||
extends DifferentialConduitAPIMethod { | extends DifferentialConduitAPIMethod { | ||||
private $errors; | private $errors; | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'differential.parsecommitmessage'; | return 'differential.parsecommitmessage'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return pht('Parse commit messages for Differential fields.'); | return pht('Parse commit messages for Differential fields.'); | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'corpus' => 'required string', | 'corpus' => 'required string', | ||||
'partial' => 'optional bool', | 'partial' => 'optional bool', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'nonempty dict'; | return 'nonempty dict'; | ||||
} | } | ||||
public function defineErrorTypes() { | |||||
return array(); | |||||
} | |||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$viewer = $request->getUser(); | $viewer = $request->getUser(); | ||||
$corpus = $request->getValue('corpus'); | $corpus = $request->getValue('corpus'); | ||||
$is_partial = $request->getValue('partial'); | $is_partial = $request->getValue('partial'); | ||||
$revision = new DifferentialRevision(); | $revision = new DifferentialRevision(); | ||||
$field_list = PhabricatorCustomField::getObjectFields( | $field_list = PhabricatorCustomField::getObjectFields( | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |