Skip to content

Commit 7fa105e

Browse files
authored
Merge pull request #51 from wp-cli/fix/clone-dot-github
2 parents 0358a93 + 15cce48 commit 7fa105e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.maintenance/clone-all-repositories.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
'wp-cli-roadmap',
1212
);
1313

14+
$clone_destination_map = array(
15+
'.github' => 'dot-github',
16+
);
17+
1418
$request = 'https://api.github.com/orgs/wp-cli/repos?per_page=100';
1519
$headers = '';
1620
$token = getenv( 'GITHUB_TOKEN' );
@@ -37,9 +41,10 @@
3741
}
3842

3943
if ( ! is_dir( $repository->name ) ) {
44+
$destination = isset( $clone_destination_map[ $repository->name ] ) ? $clone_destination_map[ $repository->name ] : '';
4045
printf( "Fetching \033[32mwp-cli/{$repository->name}\033[0m...\n" );
4146
$clone_url = getenv( 'GITHUB_ACTION' ) ? $repository->clone_url : $repository->ssh_url;
42-
system( "git clone {$clone_url}" );
47+
system( "git clone {$clone_url} {$destination}" );
4348
}
4449

4550
$update_folders[] = $repository->name;

0 commit comments

Comments
 (0)