@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove old code for "Request Review" action from Differential

Summary: Ref T10967. This moves all remaining "request review" pathways (just `differential.createcomment`) to the new code, and removes the old action.

Test Plan: Requested review on a revision, `grep`'d for the action constant.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10967

Differential Revision: https://secure.phabricator.com/D17567

+2 -55
+2
src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php
··· 60 60 'accept' => DifferentialRevisionAcceptTransaction::TRANSACTIONTYPE, 61 61 'reject' => DifferentialRevisionRejectTransaction::TRANSACTIONTYPE, 62 62 'resign' => DifferentialRevisionResignTransaction::TRANSACTIONTYPE, 63 + 'request_review' => 64 + DifferentialRevisionRequestReviewTransaction::TRANSACTIONTYPE, 63 65 ); 64 66 65 67 $action = $request->getValue('action');
-53
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 140 140 return ($object->getStatus() == $status_closed); 141 141 case DifferentialAction::ACTION_RETHINK: 142 142 return ($object->getStatus() != $status_plan); 143 - case DifferentialAction::ACTION_REQUEST: 144 - return ($object->getStatus() != $status_review); 145 143 case DifferentialAction::ACTION_CLAIM: 146 144 return ($actor_phid != $object->getAuthorPHID()); 147 145 } ··· 198 196 $object->setStatus($status_review); 199 197 return; 200 198 case DifferentialAction::ACTION_REOPEN: 201 - $object->setStatus($status_review); 202 - return; 203 - case DifferentialAction::ACTION_REQUEST: 204 199 $object->setStatus($status_review); 205 200 return; 206 201 case DifferentialAction::ACTION_CLOSE: ··· 292 287 // the author didn't update the revision, essentially undoing the 293 288 // "Plan Changes". 294 289 $downgrade_accepts = true; 295 - } 296 - break; 297 - 298 - // TODO: Remove this, obsoleted by ModularTransactions above. 299 - case DifferentialTransaction::TYPE_ACTION: 300 - switch ($xaction->getNewValue()) { 301 - case DifferentialAction::ACTION_REQUEST: 302 - $downgrade_rejects = true; 303 - if ((!$is_sticky_accept) || 304 - ($object->getStatus() != $status_plan)) { 305 - $downgrade_accepts = true; 306 - } 307 - break; 308 290 } 309 291 break; 310 292 } ··· 941 923 case ArcanistDifferentialRevisionStatus::CLOSED: 942 924 return pht( 943 925 'You can not plan changes to this revision because it has '. 944 - 'already been closed.'); 945 - default: 946 - throw new Exception( 947 - pht( 948 - 'Encountered unexpected revision status ("%s") when '. 949 - 'validating "%s" action.', 950 - $revision_status, 951 - $action)); 952 - } 953 - break; 954 - 955 - case DifferentialAction::ACTION_REQUEST: 956 - if (!$actor_is_author) { 957 - return pht( 958 - 'You can not request review of this revision because you do '. 959 - 'not own it. To request review of a revision, you must be its '. 960 - 'owner.'); 961 - } 962 - 963 - switch ($revision_status) { 964 - case ArcanistDifferentialRevisionStatus::ACCEPTED: 965 - case ArcanistDifferentialRevisionStatus::NEEDS_REVISION: 966 - case ArcanistDifferentialRevisionStatus::CHANGES_PLANNED: 967 - // These are OK. 968 - break; 969 - case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW: 970 - // This will be caught as "no effect" later on. 971 - break; 972 - case ArcanistDifferentialRevisionStatus::ABANDONED: 973 - return pht( 974 - 'You can not request review of this revision because it has '. 975 - 'been abandoned. Instead, reclaim it.'); 976 - case ArcanistDifferentialRevisionStatus::CLOSED: 977 - return pht( 978 - 'You can not request review of this revision because it has '. 979 926 'already been closed.'); 980 927 default: 981 928 throw new Exception(
-2
src/applications/differential/storage/DifferentialTransaction.php
··· 607 607 'not closed.'); 608 608 case DifferentialAction::ACTION_RETHINK: 609 609 return pht('This revision already requires changes.'); 610 - case DifferentialAction::ACTION_REQUEST: 611 - return pht('Review is already requested for this revision.'); 612 610 case DifferentialAction::ACTION_CLAIM: 613 611 return pht( 614 612 'You can not commandeer this revision because you already own '.