mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 14:51:06 +01:00
Display author of last manual diff in summary and test plan comments
Summary: D2550 is not compatible with D2540. Example: D2559. Test Plan: Display commandeered revision. Reviewers: nh Reviewed By: nh CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2567
This commit is contained in:
parent
0e3aeab1b3
commit
0da0632242
1 changed files with 11 additions and 9 deletions
|
@ -58,13 +58,15 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
}
|
||||
}
|
||||
|
||||
$target_manual = $target;
|
||||
if (!$target_id) {
|
||||
foreach ($diffs as $diff) {
|
||||
if ($diff->getCreationMethod() != 'commit') {
|
||||
$target_manual = $diff;
|
||||
$last_manual = $diff;
|
||||
}
|
||||
}
|
||||
|
||||
$target_manual = $target;
|
||||
if (!$target_id) {
|
||||
$target_manual = $last_manual;
|
||||
}
|
||||
|
||||
$diffs = mpull($diffs, null, 'getID');
|
||||
|
@ -85,7 +87,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
|
||||
$comments = $revision->loadComments();
|
||||
$comments = array_merge(
|
||||
$this->getImplicitComments($revision),
|
||||
$this->getImplicitComments($revision, $last_manual),
|
||||
$comments);
|
||||
|
||||
$all_changesets = $changesets;
|
||||
|
@ -362,9 +364,9 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
));
|
||||
}
|
||||
|
||||
private function getImplicitComments(DifferentialRevision $revision) {
|
||||
|
||||
$diff = $revision->loadActiveDiff();
|
||||
private function getImplicitComments(
|
||||
DifferentialRevision $revision,
|
||||
DifferentialDiff $diff) {
|
||||
|
||||
$template = new DifferentialComment();
|
||||
$template->setAuthorPHID($diff->getAuthorPHID());
|
||||
|
|
Loading…
Reference in a new issue