Page MenuHomePhabricator

D17191.diff
No OneTemporary

D17191.diff

diff --git a/src/applications/differential/xaction/DifferentialRevisionAbandonTransaction.php b/src/applications/differential/xaction/DifferentialRevisionAbandonTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionAbandonTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionAbandonTransaction.php
@@ -26,6 +26,10 @@
return 500;
}
+ public function getActionName() {
+ return pht('Abandoned');
+ }
+
public function getCommandKeyword() {
return 'abandon';
}
diff --git a/src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php b/src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php
@@ -26,6 +26,10 @@
return 500;
}
+ public function getActionName() {
+ return pht('Accepted');
+ }
+
public function getCommandKeyword() {
$accept_key = 'differential.enable-email-accept';
$allow_email_accept = PhabricatorEnv::getEnvConfig($accept_key);
diff --git a/src/applications/differential/xaction/DifferentialRevisionActionTransaction.php b/src/applications/differential/xaction/DifferentialRevisionActionTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionActionTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionActionTransaction.php
@@ -35,6 +35,10 @@
return 1000;
}
+ public function getActionStrength() {
+ return 3;
+ }
+
public function getRevisionActionOrderVector() {
return id(new PhutilSortVector())
->addInt($this->getRevisionActionOrder());
diff --git a/src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php b/src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php
@@ -26,6 +26,10 @@
return 300;
}
+ public function getActionName() {
+ return pht('Closed');
+ }
+
public function generateOldValue($object) {
return $object->isClosed();
}
diff --git a/src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php b/src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php
@@ -26,6 +26,10 @@
return 700;
}
+ public function getActionName() {
+ return pht('Commandeered');
+ }
+
public function getCommandKeyword() {
return 'commandeer';
}
diff --git a/src/applications/differential/xaction/DifferentialRevisionPlanChangesTransaction.php b/src/applications/differential/xaction/DifferentialRevisionPlanChangesTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionPlanChangesTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionPlanChangesTransaction.php
@@ -27,6 +27,10 @@
return 200;
}
+ public function getActionName() {
+ return pht('Planned Changes');
+ }
+
public function getCommandKeyword() {
return 'planchanges';
}
diff --git a/src/applications/differential/xaction/DifferentialRevisionReclaimTransaction.php b/src/applications/differential/xaction/DifferentialRevisionReclaimTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionReclaimTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionReclaimTransaction.php
@@ -26,6 +26,10 @@
return 600;
}
+ public function getActionName() {
+ return pht('Reclaimed');
+ }
+
public function getCommandKeyword() {
return 'reclaim';
}
diff --git a/src/applications/differential/xaction/DifferentialRevisionRejectTransaction.php b/src/applications/differential/xaction/DifferentialRevisionRejectTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionRejectTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionRejectTransaction.php
@@ -26,6 +26,10 @@
return 600;
}
+ public function getActionName() {
+ return pht('Requested Changes');
+ }
+
public function getCommandKeyword() {
return 'request';
}
diff --git a/src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php b/src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionReopenTransaction.php
@@ -26,6 +26,10 @@
return 400;
}
+ public function getActionName() {
+ return pht('Reopened');
+ }
+
public function generateOldValue($object) {
return !$object->isClosed();
}
diff --git a/src/applications/differential/xaction/DifferentialRevisionRequestReviewTransaction.php b/src/applications/differential/xaction/DifferentialRevisionRequestReviewTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionRequestReviewTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionRequestReviewTransaction.php
@@ -22,6 +22,10 @@
return 200;
}
+ public function getActionName() {
+ return pht('Requested Review');
+ }
+
public function generateOldValue($object) {
$status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW;
return ($object->getStatus() == $status_review);
diff --git a/src/applications/differential/xaction/DifferentialRevisionResignTransaction.php b/src/applications/differential/xaction/DifferentialRevisionResignTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionResignTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionResignTransaction.php
@@ -30,6 +30,10 @@
return 'resign';
}
+ public function getActionName() {
+ return pht('Resigned');
+ }
+
public function getCommandAliases() {
return array();
}
diff --git a/src/applications/diffusion/xaction/DiffusionCommitAcceptTransaction.php b/src/applications/diffusion/xaction/DiffusionCommitAcceptTransaction.php
--- a/src/applications/diffusion/xaction/DiffusionCommitAcceptTransaction.php
+++ b/src/applications/diffusion/xaction/DiffusionCommitAcceptTransaction.php
@@ -26,6 +26,10 @@
return 500;
}
+ public function getActionName() {
+ return pht('Accepted');
+ }
+
public function generateOldValue($object) {
$actor = $this->getActor();
return $this->isViewerAcceptingAuditor($object, $actor);
diff --git a/src/applications/diffusion/xaction/DiffusionCommitConcernTransaction.php b/src/applications/diffusion/xaction/DiffusionCommitConcernTransaction.php
--- a/src/applications/diffusion/xaction/DiffusionCommitConcernTransaction.php
+++ b/src/applications/diffusion/xaction/DiffusionCommitConcernTransaction.php
@@ -26,6 +26,10 @@
return 600;
}
+ public function getActionName() {
+ return pht('Raised Concern');
+ }
+
public function generateOldValue($object) {
$actor = $this->getActor();
return $this->isViewerRejectingAuditor($object, $actor);
diff --git a/src/applications/diffusion/xaction/DiffusionCommitResignTransaction.php b/src/applications/diffusion/xaction/DiffusionCommitResignTransaction.php
--- a/src/applications/diffusion/xaction/DiffusionCommitResignTransaction.php
+++ b/src/applications/diffusion/xaction/DiffusionCommitResignTransaction.php
@@ -26,6 +26,10 @@
return 700;
}
+ public function getActionName() {
+ return pht('Resigned');
+ }
+
public function generateOldValue($object) {
$actor = $this->getActor();
return !$this->isViewerAnyActiveAuditor($object, $actor);
diff --git a/src/applications/transactions/storage/PhabricatorModularTransaction.php b/src/applications/transactions/storage/PhabricatorModularTransaction.php
--- a/src/applications/transactions/storage/PhabricatorModularTransaction.php
+++ b/src/applications/transactions/storage/PhabricatorModularTransaction.php
@@ -110,6 +110,24 @@
return parent::getTitle();
}
+ /* final */ public function getActionName() {
+ $action = $this->getTransactionImplementation()->getActionName();
+ if ($action !== null) {
+ return $action;
+ }
+
+ return parent::getActionName();
+ }
+
+ /* final */ public function getActionStrength() {
+ $strength = $this->getTransactionImplementation()->getActionStrength();
+ if ($strength !== null) {
+ return $strength;
+ }
+
+ return parent::getActionStrength();
+ }
+
public function getTitleForMail() {
$old_target = $this->getRenderingTarget();
$new_target = self::TARGET_TEXT;
diff --git a/src/applications/transactions/storage/PhabricatorModularTransactionType.php b/src/applications/transactions/storage/PhabricatorModularTransactionType.php
--- a/src/applications/transactions/storage/PhabricatorModularTransactionType.php
+++ b/src/applications/transactions/storage/PhabricatorModularTransactionType.php
@@ -59,6 +59,14 @@
return null;
}
+ public function getActionName() {
+ return null;
+ }
+
+ public function getActionStrength() {
+ return null;
+ }
+
public function getColor() {
return null;
}

File Metadata

Mime Type
text/plain
Expires
Jun 9 2024, 8:55 AM (5 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6276964
Default Alt Text
D17191.diff (9 KB)

Event Timeline