Differential D17133 Diff 41202 src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php
| Show All 20 Lines | final class DifferentialRevisionAcceptTransaction | ||||
| public function getColor() { | public function getColor() { | ||||
| return 'green'; | return 'green'; | ||||
| } | } | ||||
| protected function getRevisionActionOrder() { | protected function getRevisionActionOrder() { | ||||
| return 500; | return 500; | ||||
| } | } | ||||
| public function getCommandKeyword() { | |||||
| $accept_key = 'differential.enable-email-accept'; | |||||
| $allow_email_accept = PhabricatorEnv::getEnvConfig($accept_key); | |||||
| if (!$allow_email_accept) { | |||||
| return null; | |||||
| } | |||||
| return 'accept'; | |||||
| } | |||||
| public function getCommandAliases() { | |||||
| return array(); | |||||
| } | |||||
| public function getCommandSummary() { | |||||
| return pht('Accept a revision.'); | |||||
| } | |||||
| public function generateOldValue($object) { | public function generateOldValue($object) { | ||||
| $actor = $this->getActor(); | $actor = $this->getActor(); | ||||
| return $this->isViewerAcceptingReviewer($object, $actor); | return $this->isViewerAcceptingReviewer($object, $actor); | ||||
| } | } | ||||
| public function applyExternalEffects($object, $value) { | public function applyExternalEffects($object, $value) { | ||||
| $status = DifferentialReviewerStatus::STATUS_ACCEPTED; | $status = DifferentialReviewerStatus::STATUS_ACCEPTED; | ||||
| $actor = $this->getActor(); | $actor = $this->getActor(); | ||||
| ▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines | |||||