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

Add missing needReviewerAuthority() for differential.createcomment

Summary: For some actions (like accept) we need to load reviewer authority so we can figure out if the actor can act on behalf of project reviewers, etc.

Test Plan: Will make @dctrwatson do it.

Reviewers: dctrwatson, btrahan

Reviewed By: btrahan

Subscribers: chad, aran, dctrwatson, epriestley

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

+2 -31
+2 -1
src/applications/differential/conduit/ConduitAPI_differential_createcomment_Method.php
··· 37 37 ->setViewer($viewer) 38 38 ->withIDs(array($request->getValue('revision_id'))) 39 39 ->needReviewerStatus(true) 40 + ->needReviewerAuthority(true) 40 41 ->executeOne(); 41 42 if (!$revision) { 42 43 throw new ConduitException('ERR_BAD_REVISION'); ··· 45 46 $xactions = array(); 46 47 47 48 $action = $request->getValue('action'); 48 - if ($action && ($action != 'comment')) { 49 + if ($action && ($action != 'comment') && ($action != 'none')) { 49 50 $xactions[] = id(new DifferentialTransaction()) 50 51 ->setTransactionType(DifferentialTransaction::TYPE_ACTION) 51 52 ->setNewValue($action);
-30
src/applications/differential/constants/DifferentialAction.php
··· 102 102 return $title; 103 103 } 104 104 105 - /* legacy, for just mail now */ 106 - public static function getActionPastTenseVerb($action) { 107 - $verbs = array( 108 - self::ACTION_COMMENT => 'commented on', 109 - self::ACTION_ACCEPT => 'accepted', 110 - self::ACTION_REJECT => 'requested changes to', 111 - self::ACTION_RETHINK => 'planned changes to', 112 - self::ACTION_ABANDON => 'abandoned', 113 - self::ACTION_CLOSE => 'closed', 114 - self::ACTION_REQUEST => 'requested a review of', 115 - self::ACTION_RECLAIM => 'reclaimed', 116 - self::ACTION_UPDATE => 'updated', 117 - self::ACTION_RESIGN => 'resigned from', 118 - self::ACTION_SUMMARIZE => 'summarized', 119 - self::ACTION_TESTPLAN => 'explained the test plan for', 120 - self::ACTION_CREATE => 'created', 121 - self::ACTION_ADDREVIEWERS => 'added reviewers to', 122 - self::ACTION_ADDCCS => 'added CCs to', 123 - self::ACTION_CLAIM => 'commandeered', 124 - self::ACTION_REOPEN => 'reopened', 125 - DifferentialTransaction::TYPE_INLINE => 'commented on', 126 - ); 127 - 128 - if (!empty($verbs[$action])) { 129 - return $verbs[$action]; 130 - } else { 131 - return 'brazenly "'.$action.'ed"'; 132 - } 133 - } 134 - 135 105 public static function getActionVerb($action) { 136 106 $verbs = array( 137 107 self::ACTION_COMMENT => pht('Comment'),