[PR #406] Skip VS Code extension installation in GitHub Codespaces #449

Closed
opened 2026-03-02 04:13:39 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/406

State: closed
Merged: Yes


Summary

  • Add is_github_codespaces() helper to detect Codespaces environment via CODESPACES=true env var
  • Skip VS Code extension CLI installation in Codespaces with a helpful message
  • Provide devcontainer.json configuration guidance for users

Test plan

  • Added unit test for is_github_codespaces() function
  • CI validates compilation and tests pass
  • Functional test: CODESPACES=true git-ai install-hooks --dry-run shows skip message
  • Functional test: Normal environment continues with extension installation

Unit test output

test mdm::utils::tests::test_is_github_codespaces ... ok

Functional test output

Without CODESPACES (normal behavior):

✓ VS Code: Hooks already up to date
✓ VS Code: Extension already installed

With CODESPACES=true:

✓ VS Code: Hooks already up to date
⚠ VS Code: Unable to install extension in GitHub Codespaces. Add to your devcontainer.json: "customizations": { "vscode": { "extensions": ["git-ai.git-ai-vscode"] } }

Fixes #231

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/406 **State:** closed **Merged:** Yes --- ## Summary - Add `is_github_codespaces()` helper to detect Codespaces environment via `CODESPACES=true` env var - Skip VS Code extension CLI installation in Codespaces with a helpful message - Provide devcontainer.json configuration guidance for users ## Test plan - [x] Added unit test for `is_github_codespaces()` function - [x] CI validates compilation and tests pass - [x] Functional test: `CODESPACES=true git-ai install-hooks --dry-run` shows skip message - [x] Functional test: Normal environment continues with extension installation ### Unit test output ``` test mdm::utils::tests::test_is_github_codespaces ... ok ``` ### Functional test output **Without CODESPACES (normal behavior):** ``` ✓ VS Code: Hooks already up to date ✓ VS Code: Extension already installed ``` **With CODESPACES=true:** ``` ✓ VS Code: Hooks already up to date ⚠ VS Code: Unable to install extension in GitHub Codespaces. Add to your devcontainer.json: "customizations": { "vscode": { "extensions": ["git-ai.git-ai-vscode"] } } ``` Fixes #231 🤖 Generated with [Claude Code](https://claude.ai/code)
kerem 2026-03-02 04:13:39 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#449
No description provided.