mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Remove differential.markcommitted
Summary: Ref T2222. Primary goal is to remove this callsite for `DifferentialCommentEditor`, but rather than updating it I'm just nuking this method since it's been deprecated for more than a year (more than two years?) Test Plan: Reloaded Conduit method list. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2222 Differential Revision: https://secure.phabricator.com/D8424
This commit is contained in:
parent
5801176edc
commit
3dc9afa28d
2 changed files with 0 additions and 64 deletions
|
@ -148,7 +148,6 @@ phutil_register_library_map(array(
|
|||
'ConduitAPI_differential_getrawdiff_Method' => 'applications/differential/conduit/ConduitAPI_differential_getrawdiff_Method.php',
|
||||
'ConduitAPI_differential_getrevision_Method' => 'applications/differential/conduit/ConduitAPI_differential_getrevision_Method.php',
|
||||
'ConduitAPI_differential_getrevisioncomments_Method' => 'applications/differential/conduit/ConduitAPI_differential_getrevisioncomments_Method.php',
|
||||
'ConduitAPI_differential_markcommitted_Method' => 'applications/differential/conduit/ConduitAPI_differential_markcommitted_Method.php',
|
||||
'ConduitAPI_differential_parsecommitmessage_Method' => 'applications/differential/conduit/ConduitAPI_differential_parsecommitmessage_Method.php',
|
||||
'ConduitAPI_differential_query_Method' => 'applications/differential/conduit/ConduitAPI_differential_query_Method.php',
|
||||
'ConduitAPI_differential_querydiffs_Method' => 'applications/differential/conduit/ConduitAPI_differential_querydiffs_Method.php',
|
||||
|
@ -2724,7 +2723,6 @@ phutil_register_library_map(array(
|
|||
'ConduitAPI_differential_getrawdiff_Method' => 'ConduitAPIMethod',
|
||||
'ConduitAPI_differential_getrevision_Method' => 'ConduitAPIMethod',
|
||||
'ConduitAPI_differential_getrevisioncomments_Method' => 'ConduitAPI_differential_Method',
|
||||
'ConduitAPI_differential_markcommitted_Method' => 'ConduitAPIMethod',
|
||||
'ConduitAPI_differential_parsecommitmessage_Method' => 'ConduitAPIMethod',
|
||||
'ConduitAPI_differential_query_Method' => 'ConduitAPIMethod',
|
||||
'ConduitAPI_differential_querydiffs_Method' => 'ConduitAPIMethod',
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @group conduit
|
||||
* @deprecated
|
||||
*/
|
||||
final class ConduitAPI_differential_markcommitted_Method
|
||||
extends ConduitAPIMethod {
|
||||
|
||||
public function getMethodStatus() {
|
||||
return self::METHOD_STATUS_DEPRECATED;
|
||||
}
|
||||
|
||||
public function getMethodStatusDescription() {
|
||||
return "Replaced by 'differential.close'.";
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return "Mark a revision closed.";
|
||||
}
|
||||
|
||||
public function defineParamTypes() {
|
||||
return array(
|
||||
'revision_id' => 'required revision_id',
|
||||
);
|
||||
}
|
||||
|
||||
public function defineReturnType() {
|
||||
return 'void';
|
||||
}
|
||||
|
||||
public function defineErrorTypes() {
|
||||
return array(
|
||||
'ERR_NOT_FOUND' => 'Revision was not found.',
|
||||
);
|
||||
}
|
||||
|
||||
protected function execute(ConduitAPIRequest $request) {
|
||||
$id = $request->getValue('revision_id');
|
||||
|
||||
$revision = id(new DifferentialRevisionQuery())
|
||||
->withIDs(array($id))
|
||||
->setViewer($request->getUser())
|
||||
->needRelationships(true)
|
||||
->needReviewerStatus(true)
|
||||
->executeOne();
|
||||
if (!$revision) {
|
||||
throw new ConduitException('ERR_NOT_FOUND');
|
||||
}
|
||||
|
||||
if ($revision->getStatus() == ArcanistDifferentialRevisionStatus::CLOSED) {
|
||||
return;
|
||||
}
|
||||
|
||||
$editor = new DifferentialCommentEditor(
|
||||
$revision,
|
||||
DifferentialAction::ACTION_CLOSE);
|
||||
$editor->setActor($request->getUser());
|
||||
$editor->save();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue