Page MenuHomePhabricator
Paste P1212

testparse.php
ActivePublic

Authored by epriestley on Jul 23 2014, 9:47 PM.
Tags
None
Referenced Files
F180436: testparse.php
Jul 23 2014, 9:47 PM
Subscribers
None
<?php
require_once 'scripts/__init_script__.php';
$callsign = $argv[1];
$hash = $argv[2];
$viewer = PhabricatorUser::getOmnipotentUser();
$repository = id(new PhabricatorRepositoryQuery())
->setViewer($viewer)
->withCallsigns(array($callsign))
->executeOne();
$ref = id(new DiffusionLowLevelCommitQuery())
->setRepository($repository)
->withIdentifier($hash)
->execute();
$params = array(
'corpus' => $ref->getMessage(),
'partial' => true,
);
$result = id(new ConduitCall('differential.parsecommitmessage', $params))
->setUser(PhabricatorUser::getOmnipotentUser())
->execute();
var_dump(
array(
'ref' => $ref,
'result' => $result,
'uri' => PhabricatorEnv::getProductionURI('/xyz'),
));

Event Timeline

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