Skip to content

Commit c8414d4

Browse files
committed
fix(filesChecker): check files onto related repository instead of bundled one
Fixes #65
1 parent e7b673c commit c8414d4

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/Controller/ShopwareFilesController.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,17 @@ public function restoreShopwareFile(Request $request): JsonResponse
109109
private function getShopwareUrl(string $name): ?string
110110
{
111111
$name = preg_replace('/^vendor\/shopware\//', '', $name);
112-
return 'https://github.com/shopware/platform/blob/v' . $this->shopwareVersion . '/src/' . ucfirst($name);
112+
113+
$pathParts = \explode('/', $name);
114+
$repo = $pathParts[0];
115+
array_shift($pathParts);
116+
117+
return 'https://github.com/shopware/' .
118+
$repo .
119+
'/blob/v' .
120+
$this->shopwareVersion .
121+
'/' .
122+
\implode('/', $pathParts);
113123
}
114124

115125
private function getOriginalFileContent(string $name): ?string

0 commit comments

Comments
 (0)