Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13980984
D8368.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D8368.diff
View Options
Index: src/applications/differential/storage/DifferentialTransaction.php
===================================================================
--- src/applications/differential/storage/DifferentialTransaction.php
+++ src/applications/differential/storage/DifferentialTransaction.php
@@ -115,6 +115,101 @@
return parent::getTitle();
}
+ public function getTitleForFeed(PhabricatorFeedStory $story) {
+ $author_phid = $this->getAuthorPHID();
+ $object_phid = $this->getObjectPHID();
+
+ $old = $this->getOldValue();
+ $new = $this->getNewValue();
+
+ $author_link = $this->renderHandleLink($author_phid);
+ $object_link = $this->renderHandleLink($object_phid);
+
+ switch ($this->getTransactionType()) {
+ case self::TYPE_INLINE:
+ return pht(
+ '%s added inline comments to %s.',
+ $author_link,
+ $object_link);
+ case self::TYPE_UPDATE:
+ return pht(
+ '%s updated the diff for %s.',
+ $author_link,
+ $object_link);
+ case self::TYPE_ACTION:
+ switch ($new) {
+ case DifferentialAction::ACTION_ACCEPT:
+ return pht(
+ '%s accepted %s.',
+ $author_link,
+ $object_link);
+ case DifferentialAction::ACTION_REJECT:
+ return pht(
+ '%s requested changes to %s.',
+ $author_link,
+ $object_link);
+ case DifferentialAction::ACTION_RETHINK:
+ return pht(
+ '%s planned changes to %s.',
+ $author_link,
+ $object_link);
+ case DifferentialAction::ACTION_ABANDON:
+ return pht(
+ '%s abandoned %s.',
+ $author_link,
+ $object_link);
+ case DifferentialAction::ACTION_CLOSE:
+ return pht(
+ '%s closed %s.',
+ $author_link,
+ $object_link);
+ case DifferentialAction::ACTION_REQUEST:
+ return pht(
+ '%s requested review of %s.',
+ $author_link,
+ $object_link);
+ case DifferentialAction::ACTION_RECLAIM:
+ return pht(
+ '%s reclaimed %s.',
+ $author_link,
+ $object_link);
+ case DifferentialAction::ACTION_RESIGN:
+ return pht(
+ '%s resigned from %s.',
+ $author_link,
+ $object_link);
+ case DifferentialAction::ACTION_CLAIM:
+ return pht(
+ '%s commandeered %s.',
+ $author_link,
+ $object_link);
+ case DifferentialAction::ACTION_REOPEN:
+ return pht(
+ '%s reopened %s.',
+ $author_link,
+ $object_link);
+ }
+ break;
+ case self::TYPE_STATUS:
+ switch ($this->getNewValue()) {
+ case ArcanistDifferentialRevisionStatus::ACCEPTED:
+ return pht(
+ '%s is now accepted and ready to land.',
+ $object_link);
+ case ArcanistDifferentialRevisionStatus::NEEDS_REVISION:
+ return pht(
+ '%s now requires changes to proceed.',
+ $object_link);
+ case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW:
+ return pht(
+ '%s now requires review to proceed.',
+ $object_link);
+ }
+ }
+
+ return parent::getTitleForFeed($story);
+ }
+
public function getIcon() {
switch ($this->getTransactionType()) {
case self::TYPE_INLINE:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 20 2024, 1:39 PM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6736587
Default Alt Text
D8368.diff (3 KB)
Attached To
Mode
D8368: Improve rendering of new-style Differential comments in feed/notifications
Attached
Detach File
Event Timeline
Log In to Comment