1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-31 00:48:21 +01:00

Recognise better who committed a revision.

Test Plan: Commit as not the author and see what shows up.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley, mareksapota, zeeg

Differential Revision: 1195
This commit is contained in:
Marek Sapota 2011-12-13 13:39:38 -08:00
parent c16c920f94
commit 9292cfd6a3

View file

@ -96,11 +96,19 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
$commit->getPHID());
if ($revision->getStatus() != DifferentialRevisionStatus::COMMITTED) {
$committer = null;
$message = null;
if ($commit->getDetail('authorPHID')) {
$committer = $commit->getDetail('authorPHID');
} else {
$committer = $revision->getAuthorPHID();
$message = 'Change committed by '.$commit->getAuthorName().'.';
}
$editor = new DifferentialCommentEditor(
$revision,
$revision->getAuthorPHID(),
$committer,
DifferentialAction::ACTION_COMMIT);
$editor->save();
$editor->setMessage($message)->save();
}
}
}