From 621476bf28955e60052231379f32e06e186effe9 Mon Sep 17 00:00:00 2001 From: Alessandro Date: Wed, 1 Oct 2025 09:41:59 +0200 Subject: [PATCH] fix: update copilot instructions path in project detection config --- src/Install/CodeEnvironment/Copilot.php | 4 ++-- tests/Unit/Install/CodeEnvironmentsDetectorTest.php | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Install/CodeEnvironment/Copilot.php b/src/Install/CodeEnvironment/Copilot.php index 2219539e..b97cd403 100644 --- a/src/Install/CodeEnvironment/Copilot.php +++ b/src/Install/CodeEnvironment/Copilot.php @@ -30,7 +30,7 @@ public function systemDetectionConfig(Platform $platform): array public function projectDetectionConfig(): array { return [ - 'files' => ['.github/copilot-instructions.md'], + 'files' => ['.github/instructions/copilot-instructions.md'], ]; } @@ -46,6 +46,6 @@ public function mcpClientName(): ?string public function guidelinesPath(): string { - return '.github/copilot-instructions.md'; + return '.github/instructions/copilot-instructions.md'; } } diff --git a/tests/Unit/Install/CodeEnvironmentsDetectorTest.php b/tests/Unit/Install/CodeEnvironmentsDetectorTest.php index cf80d842..7dacdf1e 100644 --- a/tests/Unit/Install/CodeEnvironmentsDetectorTest.php +++ b/tests/Unit/Install/CodeEnvironmentsDetectorTest.php @@ -145,14 +145,16 @@ $tempDir = sys_get_temp_dir().'/boost_test_'.uniqid(); mkdir($tempDir); mkdir($tempDir.'/.github'); - file_put_contents($tempDir.'/.github/copilot-instructions.md', 'test'); + mkdir ($tempDir.'/.github/instructions'); + file_put_contents($tempDir.'/.github/instructions/copilot-instructions.md', 'test'); $detected = $this->detector->discoverProjectInstalledCodeEnvironments($tempDir); expect($detected)->toContain('copilot'); // Cleanup - unlink($tempDir.'/.github/copilot-instructions.md'); + unlink($tempDir.'/.github/instructions/copilot-instructions.md'); + rmdir($tempDir.'/.github/instructions'); rmdir($tempDir.'/.github'); rmdir($tempDir); });