Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P1192
comment.php
Active
Public
Actions
Authored by
epriestley
on Jul 3 2014, 8:29 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F174009: comment.php
Jul 3 2014, 8:29 PM
2014-07-03 20:29:51 (UTC+0)
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
edited the content of this paste.
(Show Details)
Jul 3 2014, 8:29 PM
2014-07-03 20:29:51 (UTC+0)
epriestley
changed the title of this paste from untitled to
comment.php
.
epriestley
updated the paste's language from
autodetect
to
autodetect
.
Log In to Comment