Page MenuHomePhabricator

comment.php

Authored By
epriestley
Jul 3 2014, 8:29 PM
Size
543 B
Referenced Files
None
Subscribers
None

comment.php

<?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();
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/vw/of/aaynaywtxdtbukd7
Default Alt Text
comment.php (543 B)

Event Timeline