@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.

at recaptime-dev/main 122 lines 3.5 kB view raw
1<?php 2 3final class DifferentialAction extends Phobject { 4 5 const ACTION_CLOSE = 'commit'; 6 const ACTION_COMMENT = 'none'; 7 const ACTION_ACCEPT = 'accept'; 8 const ACTION_REJECT = 'reject'; 9 const ACTION_RETHINK = 'rethink'; 10 const ACTION_ABANDON = 'abandon'; 11 const ACTION_REQUEST = 'request_review'; 12 const ACTION_RECLAIM = 'reclaim'; 13 const ACTION_UPDATE = 'update'; 14 const ACTION_RESIGN = 'resign'; 15 const ACTION_SUMMARIZE = 'summarize'; 16 const ACTION_TESTPLAN = 'testplan'; 17 const ACTION_CREATE = 'create'; 18 const ACTION_ADDREVIEWERS = 'add_reviewers'; 19 const ACTION_ADDCCS = 'add_ccs'; 20 const ACTION_CLAIM = 'claim'; 21 const ACTION_REOPEN = 'reopen'; 22 23 public static function getBasicStoryText($action, $author_name) { 24 switch ($action) { 25 case self::ACTION_COMMENT: 26 $title = pht( 27 '%s commented on this revision.', 28 $author_name); 29 break; 30 case self::ACTION_ACCEPT: 31 $title = pht( 32 '%s accepted this revision.', 33 $author_name); 34 break; 35 case self::ACTION_REJECT: 36 $title = pht( 37 '%s requested changes to this revision.', 38 $author_name); 39 break; 40 case self::ACTION_RETHINK: 41 $title = pht( 42 '%s planned changes to this revision.', 43 $author_name); 44 break; 45 case self::ACTION_ABANDON: 46 $title = pht( 47 '%s abandoned this revision.', 48 $author_name); 49 break; 50 case self::ACTION_CLOSE: 51 $title = pht( 52 '%s closed this revision.', 53 $author_name); 54 break; 55 case self::ACTION_REQUEST: 56 $title = pht( 57 '%s requested a review of this revision.', 58 $author_name); 59 break; 60 case self::ACTION_RECLAIM: 61 $title = pht( 62 '%s reclaimed this revision.', 63 $author_name); 64 break; 65 case self::ACTION_UPDATE: 66 $title = pht( 67 '%s updated this revision.', 68 $author_name); 69 break; 70 case self::ACTION_RESIGN: 71 $title = pht( 72 '%s resigned from this revision.', 73 $author_name); 74 break; 75 case self::ACTION_SUMMARIZE: 76 $title = pht( 77 '%s summarized this revision.', 78 $author_name); 79 break; 80 case self::ACTION_TESTPLAN: 81 $title = pht( 82 '%s explained the test plan for this revision.', 83 $author_name); 84 break; 85 case self::ACTION_CREATE: 86 $title = pht( 87 '%s created this revision.', 88 $author_name); 89 break; 90 case self::ACTION_ADDREVIEWERS: 91 $title = pht( 92 '%s added reviewers to this revision.', 93 $author_name); 94 break; 95 case self::ACTION_ADDCCS: 96 $title = pht( 97 '%s added CCs to this revision.', 98 $author_name); 99 break; 100 case self::ACTION_CLAIM: 101 $title = pht( 102 '%s commandeered this revision.', 103 $author_name); 104 break; 105 case self::ACTION_REOPEN: 106 $title = pht( 107 '%s reopened this revision.', 108 $author_name); 109 break; 110 case DifferentialTransaction::TYPE_INLINE: 111 $title = pht( 112 '%s added an inline comment.', 113 $author_name); 114 break; 115 default: 116 $title = pht('Ghosts happened to this revision.'); 117 break; 118 } 119 return $title; 120 } 121 122}