@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

Record which user accepted on behalf of packages/owners reviewers

Summary:
Ref T12271. Don't do anything with this yet, but store who accepted/rejected/whatever on behalf of reviewers.

In the future, we could use this to render stuff like "Blessed Committers (accepted by epriestley)" or whatever. I don't know that this is necessarily super useful, but it's easy to track, seems likely to be useful, and would be a gigantic pain to backfill later if we decide we want it.

Test Plan: Accepted/rejected a revision, saw reviewers update appropriately.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12271

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

+9
+2
resources/sql/autopatches/20170322.reviewers.04.actor.sql
··· 1 + ALTER TABLE {$NAMESPACE}_differential.differential_reviewer 2 + ADD lastActorPHID VARBINARY(64);
+2
src/applications/differential/storage/DifferentialReviewer.php
··· 8 8 protected $reviewerStatus; 9 9 protected $lastActionDiffPHID; 10 10 protected $lastCommentDiffPHID; 11 + protected $lastActorPHID; 11 12 12 13 private $authority = array(); 13 14 ··· 17 18 'reviewerStatus' => 'text64', 18 19 'lastActionDiffPHID' => 'phid?', 19 20 'lastCommentDiffPHID' => 'phid?', 21 + 'lastActorPHID' => 'phid?', 20 22 ), 21 23 self::CONFIG_KEY_SCHEMA => array( 22 24 'key_revision' => array(
+5
src/applications/differential/xaction/DifferentialRevisionReviewTransaction.php
··· 198 198 ->setReviewerPHID($dst_phid); 199 199 } 200 200 201 + $old_status = $reviewer->getReviewerStatus(); 201 202 $reviewer->setReviewerStatus($status); 202 203 203 204 if ($diff_phid) { 204 205 $reviewer->setLastActionDiffPHID($diff_phid); 206 + } 207 + 208 + if ($old_status !== $status) { 209 + $reviewer->setLastActorPHID($this->getActingAsPHID()); 205 210 } 206 211 207 212 try {