'required string', 'partial' => 'optional bool', ); } protected function defineReturnType() { return 'nonempty dict'; } protected function execute(ConduitAPIRequest $request) { $viewer = $this->getViewer(); $parser = DifferentialCommitMessageParser::newStandardParser($viewer); $is_partial = $request->getValue('partial'); if ($is_partial) { $parser->setRaiseMissingFieldErrors(false); } $corpus = $request->getValue('corpus'); $field_map = $parser->parseFields($corpus); $errors = $parser->getErrors(); // grab some extra information about the Differential Revision: field... $revision_id_field = new DifferentialRevisionIDField(); $revision_id_value = idx( $field_map, $revision_id_field->getFieldKeyForConduit()); $revision_id_valid_domain = PhabricatorEnv::getProductionURI(''); return array( 'errors' => $errors, 'fields' => $field_map, 'revisionIDFieldInfo' => array( 'value' => $revision_id_value, 'validDomain' => $revision_id_valid_domain, ), ); } }