<?php
$actor_phid = some user who is going to author these comments;
$table = new PhabricatorRepositoryCommit();
foreach (new LiskMigrationIterator($table) as $commit) {
if ($commit->getRepositoryPHID() != 'the new repository') {
continue;
}
$old_hash = lookup the old hash somehow;
id(new PhabricatorAuditComment())
->setTargetPHID($commit->getPHID())
->setActorPHID($actor_phid)
->setAction(PhabricatorAuditActionConstants::COMMENT)
->setContent("Previously this was known as {$old_hash}")
->save();
}