mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Attribute revision promotion from "Draft" to "Needs Review" to the author
Summary: Ref T2543. When Harbormaster finishes builds and promotes a draft revision to review, we currently publish "Harbormaster requested review of...". Instead, attribute this action to the author, since that's more natural and more useful. Test Plan: Promoted a diff locally, saw it attributed to me rather than Harbormaster. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T2543 Differential Revision: https://secure.phabricator.com/D18730
This commit is contained in:
parent
28a24c333f
commit
beaf0ad9a6
1 changed files with 6 additions and 0 deletions
|
@ -1537,7 +1537,13 @@ final class DifferentialTransactionEditor
|
||||||
if ($object->isDraft() && $auto_undraft) {
|
if ($object->isDraft() && $auto_undraft) {
|
||||||
$active_builds = $this->hasActiveBuilds($object);
|
$active_builds = $this->hasActiveBuilds($object);
|
||||||
if (!$active_builds) {
|
if (!$active_builds) {
|
||||||
|
// When Harbormaster moves a revision out of the draft state, we
|
||||||
|
// attribute the action to the revision author since this is more
|
||||||
|
// natural and more useful.
|
||||||
|
$author_phid = $object->getAuthorPHID();
|
||||||
|
|
||||||
$xaction = $object->getApplicationTransactionTemplate()
|
$xaction = $object->getApplicationTransactionTemplate()
|
||||||
|
->setAuthorPHID($author_phid)
|
||||||
->setTransactionType(
|
->setTransactionType(
|
||||||
DifferentialRevisionRequestReviewTransaction::TRANSACTIONTYPE)
|
DifferentialRevisionRequestReviewTransaction::TRANSACTIONTYPE)
|
||||||
->setOldValue(false)
|
->setOldValue(false)
|
||||||
|
|
Loading…
Reference in a new issue