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
This commit is contained in:
		| @@ -0,0 +1,2 @@ | ||||
| ALTER TABLE {$NAMESPACE}_differential.differential_reviewer | ||||
|   ADD lastActorPHID VARBINARY(64); | ||||
| @@ -8,6 +8,7 @@ final class DifferentialReviewer | ||||
|   protected $reviewerStatus; | ||||
|   protected $lastActionDiffPHID; | ||||
|   protected $lastCommentDiffPHID; | ||||
|   protected $lastActorPHID; | ||||
|  | ||||
|   private $authority = array(); | ||||
|  | ||||
| @@ -17,6 +18,7 @@ final class DifferentialReviewer | ||||
|         'reviewerStatus' => 'text64', | ||||
|         'lastActionDiffPHID' => 'phid?', | ||||
|         'lastCommentDiffPHID' => 'phid?', | ||||
|         'lastActorPHID' => 'phid?', | ||||
|       ), | ||||
|       self::CONFIG_KEY_SCHEMA => array( | ||||
|         'key_revision' => array( | ||||
|   | ||||
| @@ -198,12 +198,17 @@ abstract class DifferentialRevisionReviewTransaction | ||||
|             ->setReviewerPHID($dst_phid); | ||||
|         } | ||||
|  | ||||
|         $old_status = $reviewer->getReviewerStatus(); | ||||
|         $reviewer->setReviewerStatus($status); | ||||
|  | ||||
|         if ($diff_phid) { | ||||
|           $reviewer->setLastActionDiffPHID($diff_phid); | ||||
|         } | ||||
|  | ||||
|         if ($old_status !== $status) { | ||||
|           $reviewer->setLastActorPHID($this->getActingAsPHID()); | ||||
|         } | ||||
|  | ||||
|         try { | ||||
|           $reviewer->save(); | ||||
|         } catch (AphrontDuplicateKeyQueryException $ex) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 epriestley
					epriestley