Skip to content

Commit c396683

Browse files
committed
MAGETWO-57697: ModuleDBChangeTest failed in develop branch
1 parent dcfad08 commit c396683

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

dev/tests/static/get_github_changes.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
$mainline = 'mainline_' . (string)rand(0, 9999);
3838
$repo = getRepo($options, $mainline);
39-
$branches = $repo->getBranches();
39+
$branches = $repo->getBranches('--remotes');
4040
generateBranchesList($options['output-file'], $branches, $options['branch']);
4141
$changes = retrieveChangesAcrossForks($mainline, $repo, $options['branch']);
4242
$changedFiles = getChangedFiles($changes, $fileExtensions);
@@ -73,7 +73,7 @@ function generateBranchesList($outputFile, $branches, $branchName)
7373
$branchesList = fopen($branchOutputFile, 'w');
7474
fwrite($branchesList, $branchName . PHP_EOL);
7575
foreach ($branches as $branch) {
76-
fwrite($branchesList, substr(strrchr($branch, '/'),1) . PHP_EOL);
76+
fwrite($branchesList, substr(strrchr($branch, '/'), 1) . PHP_EOL);
7777
}
7878
fclose($branchesList);
7979
}
@@ -105,7 +105,7 @@ function getChangedFiles(array $changes, array $fileExtensions)
105105
*
106106
* @param array $options
107107
* @param string $mainline
108-
* @return array
108+
* @return GitRepo
109109
* @throws Exception
110110
*/
111111
function getRepo($options, $mainline)
@@ -227,11 +227,12 @@ public function fetch($remoteAlias)
227227
/**
228228
* Returns branches
229229
*
230-
* @return array
230+
* @param string $source
231+
* @return array|mixed
231232
*/
232-
public function getBranches()
233+
public function getBranches($source = '--all')
233234
{
234-
$result = $this->call(sprintf('branch -r'));
235+
$result = $this->call(sprintf('branch ' . $source));
235236

236237
return is_array($result) ? $result : [];
237238
}

0 commit comments

Comments
 (0)