Page MenuHomePhabricator
Paste P1192

comment.php
ActivePublic

Authored by epriestley on Jul 3 2014, 8:29 PM.
Tags
None
Referenced Files
F174009: comment.php
Jul 3 2014, 8:29 PM
Subscribers
None
<?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();
}

Event Timeline

epriestley changed the title of this paste from untitled to comment.php.
epriestley updated the paste's language from autodetect to autodetect.