mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
Apply Owners reviewers using ModularTransactions
Summary: Ref T10967. See that task for some discussion. This lets us do double writes on this pathway. Test Plan: Set an Owners package to auto-review. Created revisions which triggered it: one with no reviewers (autoreview added); one with the package as a blocking reviewer explicitly (no automatic stuff happened, as expected). Reviewers: chad Reviewed By: chad Maniphest Tasks: T10967 Differential Revision: https://secure.phabricator.com/D17512
This commit is contained in:
parent
216052baf9
commit
a9cbbf3e5e
1 changed files with 8 additions and 9 deletions
|
@ -1687,22 +1687,21 @@ final class DifferentialTransactionEditor
|
|||
|
||||
$value = array();
|
||||
foreach ($phids as $phid) {
|
||||
$value[$phid] = array(
|
||||
'data' => array(
|
||||
'status' => $new_status,
|
||||
),
|
||||
);
|
||||
if ($is_blocking) {
|
||||
$value[] = 'blocking('.$phid.')';
|
||||
} else {
|
||||
$value[] = $phid;
|
||||
}
|
||||
}
|
||||
|
||||
$edgetype_reviewer = DifferentialRevisionHasReviewerEdgeType::EDGECONST;
|
||||
|
||||
$owners_phid = id(new PhabricatorOwnersApplication())
|
||||
->getPHID();
|
||||
|
||||
$reviewers_type = DifferentialRevisionReviewersTransaction::TRANSACTIONTYPE;
|
||||
|
||||
return $object->getApplicationTransactionTemplate()
|
||||
->setAuthorPHID($owners_phid)
|
||||
->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
|
||||
->setMetadataValue('edge:type', $edgetype_reviewer)
|
||||
->setTransactionType($reviewers_type)
|
||||
->setNewValue(
|
||||
array(
|
||||
'+' => $value,
|
||||
|
|
Loading…
Reference in a new issue