2011-02-06 22:42:00 +01:00
|
|
|
<?php
|
|
|
|
|
Rename Conduit classes
Summary: Ref T5655. Rename Conduit classes and provide a `getAPIMethodName` method to declare the API method.
Test Plan:
```
> echo '{}' | arc --conduit-uri='http://phabricator.joshuaspence.com' call-conduit user.whoami
Waiting for JSON parameters on stdin...
{"error":null,"errorMessage":null,"response":{"phid":"PHID-USER-lioqffnwn6y475mu5ndb","userName":"josh","realName":"Joshua Spence","image":"http:\/\/phabricator.joshuaspence.com\/res\/1404425321T\/phabricator\/3eb28cd9\/rsrc\/image\/avatar.png","uri":"http:\/\/phabricator.joshuaspence.com\/p\/josh\/","roles":["admin","verified","approved","activated"]}}
```
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: epriestley, Korvin, hach-que
Maniphest Tasks: T5655
Differential Revision: https://secure.phabricator.com/D9991
2014-07-25 02:54:15 +02:00
|
|
|
final class DifferentialParseCommitMessageConduitAPIMethod
|
|
|
|
extends DifferentialConduitAPIMethod {
|
2011-02-06 22:42:00 +01:00
|
|
|
|
2012-09-11 02:09:10 +02:00
|
|
|
private $errors;
|
|
|
|
|
Rename Conduit classes
Summary: Ref T5655. Rename Conduit classes and provide a `getAPIMethodName` method to declare the API method.
Test Plan:
```
> echo '{}' | arc --conduit-uri='http://phabricator.joshuaspence.com' call-conduit user.whoami
Waiting for JSON parameters on stdin...
{"error":null,"errorMessage":null,"response":{"phid":"PHID-USER-lioqffnwn6y475mu5ndb","userName":"josh","realName":"Joshua Spence","image":"http:\/\/phabricator.joshuaspence.com\/res\/1404425321T\/phabricator\/3eb28cd9\/rsrc\/image\/avatar.png","uri":"http:\/\/phabricator.joshuaspence.com\/p\/josh\/","roles":["admin","verified","approved","activated"]}}
```
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: epriestley, Korvin, hach-que
Maniphest Tasks: T5655
Differential Revision: https://secure.phabricator.com/D9991
2014-07-25 02:54:15 +02:00
|
|
|
public function getAPIMethodName() {
|
|
|
|
return 'differential.parsecommitmessage';
|
|
|
|
}
|
|
|
|
|
2011-02-06 22:42:00 +01:00
|
|
|
public function getMethodDescription() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Parse commit messages for Differential fields.');
|
2011-02-06 22:42:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function defineParamTypes() {
|
|
|
|
return array(
|
2012-02-29 01:56:19 +01:00
|
|
|
'corpus' => 'required string',
|
|
|
|
'partial' => 'optional bool',
|
2011-02-06 22:42:00 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function defineReturnType() {
|
|
|
|
return 'nonempty dict';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function defineErrorTypes() {
|
2014-03-08 02:05:00 +01:00
|
|
|
return array();
|
2011-02-06 22:42:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
protected function execute(ConduitAPIRequest $request) {
|
2014-03-08 02:05:00 +01:00
|
|
|
$viewer = $request->getUser();
|
2011-02-06 22:42:00 +01:00
|
|
|
$corpus = $request->getValue('corpus');
|
2012-02-29 01:56:19 +01:00
|
|
|
$is_partial = $request->getValue('partial');
|
2011-02-06 22:42:00 +01:00
|
|
|
|
2014-03-08 02:05:00 +01:00
|
|
|
$revision = new DifferentialRevision();
|
2011-02-06 22:42:00 +01:00
|
|
|
|
2014-03-08 02:05:00 +01:00
|
|
|
$field_list = PhabricatorCustomField::getObjectFields(
|
|
|
|
$revision,
|
|
|
|
DifferentialCustomField::ROLE_COMMITMESSAGE);
|
|
|
|
$field_list->setViewer($viewer);
|
|
|
|
$field_map = mpull($field_list->getFields(), null, 'getFieldKeyForConduit');
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
|
2012-09-11 02:09:10 +02:00
|
|
|
$this->errors = array();
|
|
|
|
|
2014-03-08 02:05:00 +01:00
|
|
|
$label_map = $this->buildLabelMap($field_list);
|
|
|
|
$corpus_map = $this->parseCommitMessage($corpus, $label_map);
|
|
|
|
|
|
|
|
$values = array();
|
|
|
|
foreach ($corpus_map as $field_key => $text_value) {
|
|
|
|
$field = idx($field_map, $field_key);
|
|
|
|
|
|
|
|
if (!$field) {
|
|
|
|
throw new Exception(
|
|
|
|
pht(
|
|
|
|
'Parser emitted text value for field key "%s", but no such '.
|
|
|
|
'field exists.',
|
|
|
|
$field_key));
|
|
|
|
}
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
|
|
|
|
try {
|
2014-03-08 02:05:00 +01:00
|
|
|
$values[$field_key] = $field->parseValueFromCommitMessage($text_value);
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
} catch (DifferentialFieldParseException $ex) {
|
2014-03-08 02:05:00 +01:00
|
|
|
$this->errors[] = pht(
|
|
|
|
'Error parsing field "%s": %s',
|
|
|
|
$field->renderCommitMessageLabel(),
|
|
|
|
$ex->getMessage());
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-29 01:56:19 +01:00
|
|
|
if (!$is_partial) {
|
2014-03-08 02:05:00 +01:00
|
|
|
foreach ($field_map as $key => $field) {
|
2012-02-29 01:56:19 +01:00
|
|
|
try {
|
2014-03-08 02:05:00 +01:00
|
|
|
$field->validateCommitMessageValue(idx($values, $key));
|
2012-02-29 01:56:19 +01:00
|
|
|
} catch (DifferentialFieldValidationException $ex) {
|
2014-03-08 02:05:00 +01:00
|
|
|
$this->errors[] = pht(
|
|
|
|
'Invalid or missing field "%s": %s',
|
|
|
|
$field->renderCommitMessageLabel(),
|
|
|
|
$ex->getMessage());
|
2012-02-29 01:56:19 +01:00
|
|
|
}
|
Validate all fields in differential.parsecommitmessage
Summary:
- We currently run ##parseValueFromCommitMessage()## on all fields present in
the message, but not ##validateField()##.
- This detects value errors (e.g., an invalid reviewer) but not higher-level
errors (e.g., a missing field).
- This can break the stacked-commits Git mutable history workflow by
recognizing too many commit messages as valid ("multiple valid commit messages,
this is ambiguous").
- This also gives you some errors ("Missing test plan") too late in "arc diff
--create" (after the diff has been built).
Test Plan:
- Grepped for validateField() calls, removed a couple of calls that had the
same implementation as the base class.
- Grepped for other calls to this to make sure I'm not stumbling into
unintended side effects, but it only runs from the diff workflow.
- Ran "arc diff --create" with an invalid test plan, got a good error early in
the process.
- Ran "arc diff master" with stacked local commits, got a correct selection of
the intended message.
Reviewers: cpiro, btrahan, jungejason
Reviewed By: cpiro
CC: aran, cpiro
Differential Revision: https://secure.phabricator.com/D1373
2012-01-12 04:55:05 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-14 01:55:26 +02:00
|
|
|
// grab some extra information about the Differential Revision: field...
|
|
|
|
$revision_id_field = new DifferentialRevisionIDField();
|
|
|
|
$revision_id_value = idx(
|
|
|
|
$corpus_map,
|
|
|
|
$revision_id_field->getFieldKeyForConduit());
|
|
|
|
$revision_id_valid_domain = PhabricatorEnv::getProductionURI('');
|
|
|
|
|
2011-02-06 22:42:00 +01:00
|
|
|
return array(
|
2012-09-11 02:09:10 +02:00
|
|
|
'errors' => $this->errors,
|
2014-03-08 02:05:00 +01:00
|
|
|
'fields' => $values,
|
2014-10-14 01:55:26 +02:00
|
|
|
'revisionIDFieldInfo' => array(
|
|
|
|
'value' => $revision_id_value,
|
|
|
|
'validDomain' => $revision_id_valid_domain,
|
|
|
|
),
|
2011-02-06 22:42:00 +01:00
|
|
|
);
|
|
|
|
}
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
|
2014-03-08 02:05:00 +01:00
|
|
|
private function buildLabelMap(PhabricatorCustomFieldList $field_list) {
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
$label_map = array();
|
2014-03-08 02:05:00 +01:00
|
|
|
|
|
|
|
foreach ($field_list->getFields() as $key => $field) {
|
|
|
|
$labels = $field->getCommitMessageLabels();
|
|
|
|
$key = $field->getFieldKeyForConduit();
|
|
|
|
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
foreach ($labels as $label) {
|
2014-03-08 02:44:35 +01:00
|
|
|
$normal_label = DifferentialCommitMessageParser::normalizeFieldLabel(
|
|
|
|
$label);
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
if (!empty($label_map[$normal_label])) {
|
|
|
|
throw new Exception(
|
2014-03-08 02:05:00 +01:00
|
|
|
pht(
|
|
|
|
'Field label "%s" is parsed by two custom fields: "%s" and '.
|
|
|
|
'"%s". Each label must be parsed by only one field.',
|
|
|
|
$label,
|
|
|
|
$key,
|
|
|
|
$label_map[$normal_label]));
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
}
|
|
|
|
$label_map[$normal_label] = $key;
|
|
|
|
}
|
|
|
|
}
|
2014-03-08 02:05:00 +01:00
|
|
|
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
return $label_map;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private function parseCommitMessage($corpus, array $label_map) {
|
2014-03-08 02:05:00 +01:00
|
|
|
$key_title = id(new DifferentialTitleField())->getFieldKeyForConduit();
|
|
|
|
$key_summary = id(new DifferentialSummaryField())->getFieldKeyForConduit();
|
|
|
|
|
2014-03-08 02:44:35 +01:00
|
|
|
$parser = id(new DifferentialCommitMessageParser())
|
|
|
|
->setLabelMap($label_map)
|
2014-03-08 02:05:00 +01:00
|
|
|
->setTitleKey($key_title)
|
|
|
|
->setSummaryKey($key_summary);
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
|
2014-03-08 02:44:35 +01:00
|
|
|
$result = $parser->parseCorpus($corpus);
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
|
2014-03-08 02:44:35 +01:00
|
|
|
foreach ($parser->getErrors() as $error) {
|
|
|
|
$this->errors[] = $error;
|
2013-10-30 05:19:51 +01:00
|
|
|
}
|
|
|
|
|
2014-03-08 02:44:35 +01:00
|
|
|
return $result;
|
Drive Differential commit message parsing through extensible fields
Summary:
I think this is the last major step -- use the fields to parse commit messages,
not a hard-coded list of stuff. This adds two primary methods to fields, one to
get all the labels they'll parse (so we can do "CC" and "CCs" and treat them as
the same field) and one to parse the string into a canonical representation
(e.g., lookup reviewers and such).
You'll need to impelement the one block of task-specific stuff I removed in
Facebook's task field:
list($pre_comment) = split(' -- ', $data);
$data = array_filter(preg_split('/[^\d]+/', $pre_comment));
foreach ($data as $k => $v) {
$data[$k] = (int)$v;
}
$data = array_unique($data);
break;
Otherwise I think this is clean.
Test Plan:
- Called the conduit method with various commit messages, parsed fields/errors
seemed correct.
- "arc diff"'d this diff onto localhost, then updated it.
- "arc amend"'d this diff.
Reviewers: jungejason, tuomaspelkonen, aran
Reviewed By: jungejason
CC: aran, jungejason, epriestley
Differential Revision: 829
2011-08-18 21:08:18 +02:00
|
|
|
}
|
|
|
|
|
2011-02-06 22:42:00 +01:00
|
|
|
}
|