diff --git a/src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php --- a/src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php +++ b/src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php @@ -60,6 +60,8 @@ 'accept' => DifferentialRevisionAcceptTransaction::TRANSACTIONTYPE, 'reject' => DifferentialRevisionRejectTransaction::TRANSACTIONTYPE, 'resign' => DifferentialRevisionResignTransaction::TRANSACTIONTYPE, + 'request_review' => + DifferentialRevisionRequestReviewTransaction::TRANSACTIONTYPE, ); $action = $request->getValue('action'); diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php --- a/src/applications/differential/editor/DifferentialTransactionEditor.php +++ b/src/applications/differential/editor/DifferentialTransactionEditor.php @@ -140,8 +140,6 @@ return ($object->getStatus() == $status_closed); case DifferentialAction::ACTION_RETHINK: return ($object->getStatus() != $status_plan); - case DifferentialAction::ACTION_REQUEST: - return ($object->getStatus() != $status_review); case DifferentialAction::ACTION_CLAIM: return ($actor_phid != $object->getAuthorPHID()); } @@ -200,9 +198,6 @@ case DifferentialAction::ACTION_REOPEN: $object->setStatus($status_review); return; - case DifferentialAction::ACTION_REQUEST: - $object->setStatus($status_review); - return; case DifferentialAction::ACTION_CLOSE: $old_status = $object->getStatus(); $object->setStatus(ArcanistDifferentialRevisionStatus::CLOSED); @@ -294,19 +289,6 @@ $downgrade_accepts = true; } break; - - // TODO: Remove this, obsoleted by ModularTransactions above. - case DifferentialTransaction::TYPE_ACTION: - switch ($xaction->getNewValue()) { - case DifferentialAction::ACTION_REQUEST: - $downgrade_rejects = true; - if ((!$is_sticky_accept) || - ($object->getStatus() != $status_plan)) { - $downgrade_accepts = true; - } - break; - } - break; } } @@ -952,41 +934,6 @@ } break; - case DifferentialAction::ACTION_REQUEST: - if (!$actor_is_author) { - return pht( - 'You can not request review of this revision because you do '. - 'not own it. To request review of a revision, you must be its '. - 'owner.'); - } - - switch ($revision_status) { - case ArcanistDifferentialRevisionStatus::ACCEPTED: - case ArcanistDifferentialRevisionStatus::NEEDS_REVISION: - case ArcanistDifferentialRevisionStatus::CHANGES_PLANNED: - // These are OK. - break; - case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW: - // This will be caught as "no effect" later on. - break; - case ArcanistDifferentialRevisionStatus::ABANDONED: - return pht( - 'You can not request review of this revision because it has '. - 'been abandoned. Instead, reclaim it.'); - case ArcanistDifferentialRevisionStatus::CLOSED: - return pht( - 'You can not request review of this revision because it has '. - 'already been closed.'); - default: - throw new Exception( - pht( - 'Encountered unexpected revision status ("%s") when '. - 'validating "%s" action.', - $revision_status, - $action)); - } - break; - case DifferentialAction::ACTION_CLOSE: // We force revisions closed when we discover a corresponding commit. // In this case, revisions are allowed to transition to closed from diff --git a/src/applications/differential/storage/DifferentialTransaction.php b/src/applications/differential/storage/DifferentialTransaction.php --- a/src/applications/differential/storage/DifferentialTransaction.php +++ b/src/applications/differential/storage/DifferentialTransaction.php @@ -607,8 +607,6 @@ 'not closed.'); case DifferentialAction::ACTION_RETHINK: return pht('This revision already requires changes.'); - case DifferentialAction::ACTION_REQUEST: - return pht('Review is already requested for this revision.'); case DifferentialAction::ACTION_CLAIM: return pht( 'You can not commandeer this revision because you already own '.