mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
Add coverage access to differential.updateunitresults
Summary: We now support an optional coverage parameter. Test Plan: ??? iiam Reviewers: tuomaspelkonen, btrahan Reviewed By: tuomaspelkonen CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1850
This commit is contained in:
parent
6712dbb709
commit
366c59f805
1 changed files with 9 additions and 5 deletions
|
@ -28,11 +28,12 @@ extends ConduitAPIMethod {
|
||||||
|
|
||||||
public function defineParamTypes() {
|
public function defineParamTypes() {
|
||||||
return array(
|
return array(
|
||||||
'diff_id' => 'required diff_id',
|
'diff_id' => 'required diff_id',
|
||||||
'file' => 'required string',
|
'file' => 'required string',
|
||||||
'name' => 'required string',
|
'name' => 'required string',
|
||||||
'result' => 'required string',
|
'result' => 'required string',
|
||||||
'message' => 'required string',
|
'message' => 'required string',
|
||||||
|
'coverage' => 'required map<string, string>',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +59,7 @@ extends ConduitAPIMethod {
|
||||||
$name = $request->getValue('name');
|
$name = $request->getValue('name');
|
||||||
$message = $request->getValue('message');
|
$message = $request->getValue('message');
|
||||||
$result = $request->getValue('result');
|
$result = $request->getValue('result');
|
||||||
|
$coverage = $request->getValue('coverage', array());
|
||||||
|
|
||||||
$diff_property = id(new DifferentialDiffProperty())->loadOneWhere(
|
$diff_property = id(new DifferentialDiffProperty())->loadOneWhere(
|
||||||
'diffID = %d AND name = %s',
|
'diffID = %d AND name = %s',
|
||||||
|
@ -84,6 +86,7 @@ extends ConduitAPIMethod {
|
||||||
$unit_result['file'] = $file;
|
$unit_result['file'] = $file;
|
||||||
$unit_result['result'] = $result;
|
$unit_result['result'] = $result;
|
||||||
$unit_result['userdata'] = $message;
|
$unit_result['userdata'] = $message;
|
||||||
|
$unit_result['coverage'] = $coverage;
|
||||||
$unit_status = $result;
|
$unit_status = $result;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -97,6 +100,7 @@ extends ConduitAPIMethod {
|
||||||
$unit_result['name'] = $name;
|
$unit_result['name'] = $name;
|
||||||
$unit_result['result'] = $result;
|
$unit_result['result'] = $result;
|
||||||
$unit_result['userdata'] = $message;
|
$unit_result['userdata'] = $message;
|
||||||
|
$unit_result['coverage'] = $coverage;
|
||||||
$unit_status = $result;
|
$unit_status = $result;
|
||||||
$unit_results[] = $unit_result;
|
$unit_results[] = $unit_result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue