protected function execute(ConduitAPIRequest $request) { $fields = $request->getValue('fields'); $diff = id(new DifferentialDiff())->load($request->getValue('diffid')); if (!$diff) { throw new ConduitException('ERR_BAD_DIFF'); } $revision = DifferentialRevisionEditor::newRevisionFromConduitWithDiff($fields, $diff, $request->getUser()->getPHID()); return array('revisionid' => $revision->getID(), 'uri' => PhabricatorEnv::getURI('/D' . $revision->getID())); }