Skip to content

Commit ade96c1

Browse files
author
Ryan Aslett (Mixologic)
committed
Fixes github refactor
1 parent e5e5f89 commit ade96c1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/SplitCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function handle(Args $args, IO $io) {
7373
$userApi = $client->api('user');
7474

7575
$paginator = new ResultPager($client);
76-
$parameters = array($this->orgname);
76+
$parameters = array($this->github_orgname);
7777
$repositories = $paginator->fetchAll($userApi, 'repositories', $parameters);
7878
foreach ($repositories as $repo) {
7979
$reponames[] = $repo['name'];
@@ -90,7 +90,7 @@ public function handle(Args $args, IO $io) {
9090
$this->splitBranch($directory, $args->getArgument('branch'), $github_apikey, $subtree_data['path'], $subtree_name);
9191
// Update tags.
9292
exec('git ls-remote --tags ' . $this->upstream, $upstream_tags);
93-
exec("git ls-remote --tags https://{$this->username}:{$github_apikey}@github.com/{$this->orgname}/{$subtree_name}.git", $downstream_tags);
93+
exec("git ls-remote --tags https://{$this->github_username}:{$github_apikey}@github.com/{$this->github_orgname}/{$subtree_name}.git", $downstream_tags);
9494

9595
$upstream_tags = Utility::filterValidTags($upstream_tags, $args->getArgument('branch'));
9696
$downstream_tags = Utility::filterValidTags($downstream_tags, $args->getArgument('branch'));
@@ -124,7 +124,7 @@ public function handle(Args $args, IO $io) {
124124
'body' => $body,
125125
'headers' => ['Content-Type' => 'application/json'],
126126
'query' => [
127-
'username' => "$this->username",
127+
'username' => "$this->github_username",
128128
'apiToken' => $packagist_apitoken,
129129
],
130130
]);
@@ -147,14 +147,14 @@ protected function updateRepository($directory, $branch) {
147147
protected function splitBranch($directory, $ref, $token, $prefix = 'core', $name = 'core') {
148148
passthru("cd {$directory} && git checkout --force {$ref} && git reset --hard origin/{$ref}");
149149
passthru("./splitsh-lite --progress --prefix={$prefix}/ --origin=origin/{$ref} --path={$directory} --target=HEAD");
150-
passthru("cd {$directory} && git push https://{$this->username}:{$token}@github.com/{$this->orgname}/{$name}.git HEAD:{$ref}");
150+
passthru("cd {$directory} && git push https://{$this->github_username}:{$token}@github.com/{$this->github_orgname}/{$name}.git HEAD:{$ref}");
151151
}
152152

153153
protected function splitTag($directory, $ref, $token, $prefix = 'core', $name = 'core') {
154154
passthru("cd {$directory} && git fetch --tags");
155155
passthru("./splitsh-lite --progress --prefix={$prefix}/ --origin=tags/{$ref} --path={$directory} --target=tags/{$ref}");
156-
passthru("cd {$directory} && git push --delete https://{$this->username}:{$token}@github.com/{$this->orgname}/{$name}.git {$ref}");
157-
passthru("cd {$directory} && git push https://{$this->username}:{$token}@github.com/{$this->orgname}/{$name}.git {$ref}");
156+
passthru("cd {$directory} && git push --delete https://{$this->github_username}:{$token}@github.com/{$this->github_orgname}/{$name}.git {$ref}");
157+
passthru("cd {$directory} && git push https://{$this->github_username}:{$token}@github.com/{$this->github_orgname}/{$name}.git {$ref}");
158158
}
159159

160160
/**

0 commit comments

Comments
 (0)