Page MenuHomePhabricator

Conduit_script_for_mass_repo_creations

Authored By
WikiChad
Jan 8 2015, 3:18 PM
Size
586 B
Referenced Files
None
Subscribers
None

Conduit_script_for_mass_repo_creations

#!/usr/bin/php
<?php
foreach( file( '/Users/chad/mw-repo-list' ) as $line ) {
list( $callsign, $oldname, $newname ) = explode( "\t", $line );
$newname = trim( $newname );
$prettyname = explode( '-', $newname, 2 );
$repoSpec = array(
'name' => $newname,
'vcs' => 'git',
'callsign' => $callsign,
"description" => "MediaWiki extension " . $prettyname[1],
"tracking" => true,
"uri" => "https://gerrit.wikimedia.org/r/p/$oldname",
"heraldEnabled" => false,
);
$repoSpec = json_encode( $repoSpec );
passthru( "echo '$repoSpec' | arc call-conduit repository.create" );
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/ys/3p/p4nghmwngtzd6dcq
Default Alt Text
Conduit_script_for_mass_repo_creations (586 B)

Event Timeline