Page MenuHomestyx hydra

PhabricatorRepositoryManagementListPathsWorkflow.php
No OneTemporary

PhabricatorRepositoryManagementListPathsWorkflow.php

<?php
final class PhabricatorRepositoryManagementListPathsWorkflow
extends PhabricatorRepositoryManagementWorkflow {
protected function didConstruct() {
$this
->setName('list-paths')
->setSynopsis(pht('List repository local paths.'))
->setArguments(array());
}
public function execute(PhutilArgumentParser $args) {
$console = PhutilConsole::getConsole();
$repos = id(new PhabricatorRepositoryQuery())
->setViewer($this->getViewer())
->execute();
if (!$repos) {
$console->writeErr("%s\n", pht('There are no repositories.'));
return 0;
}
$table = id(new PhutilConsoleTable())
->addColumn(
'monogram',
array(
'title' => pht('Repository'),
))
->addColumn(
'path',
array(
'title' => pht('Path'),
))
->setBorders(true);
foreach ($repos as $repo) {
$table->addRow(
array(
'monogram' => $repo->getMonogram(),
'path' => $repo->getLocalPath(),
));
}
$table->draw();
return 0;
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Nov 24, 2:13 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
348359
Default Alt Text
PhabricatorRepositoryManagementListPathsWorkflow.php (1 KB)

Event Timeline