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:
parent
c16c920f94
commit
9292cfd6a3
1 changed files with 10 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue