2 Commits

Author SHA1 Message Date
eb3a74b709 feat: Add devcontainer configuration and setup script for Gemini Agent
All checks were successful
Lint / pre-commit Linting (push) Successful in 1m45s
2025-12-25 11:12:41 +01:00
25e4ba9f71 feat: Add relevant check-jsonschema pre-commit hooks (#48)
All checks were successful
Lint / pre-commit Linting (push) Successful in 1m20s
Reviewed-on: #48
2025-12-21 14:03:52 +01:00
4 changed files with 59 additions and 0 deletions

0
.devcontainer/Dockerfile Normal file
View File

View File

@@ -0,0 +1,42 @@
{
"name": "Gemini Agent Quality Ops",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/python:1": {
"version": "3.11",
"installTools": true,
"optimize": true
},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/git-lfs:1": {},
"ghcr.io/devcontainers-extra/features/pipx-package:1": {
"packages": "pre-commit, ruff"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"esbenp.prettier-vscode",
"vitest.explorer",
"google.gemini-cli-vscode-ide-companion",
"google.geminicodeassist"
],
"settings": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
},
"postCreateCommand": "npm install",
"postStartCommand": "bash .devcontainer/setup.sh",
"remoteUser": "node",
"mounts": [
"source=pipx-venvs,target=/home/node/.local/share/pipx,type=volume",
"source=pipx-bin,target=/home/node/.local/bin,type=volume",
"source=pre-commit-cache,target=/home/node/.cache/pre-commit,type=volume",
"source=${localEnv:HOME}/.gemini,target=/home/node/.gemini,type=bind"
]
}

16
.devcontainer/setup.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
# 1. Fix Git Permissions (Critical in Docker)
sudo chown -R $(whoami) .git
git config --global --add safe.directory $(pwd)
# 2. Re-connect Git Hooks
# 'pre-commit install' is idempotent (it checks if the hook exists and exits fast).
# It's safe to run on every start.
if command -v pre-commit &> /dev/null; then
pre-commit install
else
echo "⚠️ Warning: pre-commit not found. Skipping hook installation."
fi
# We REMOVED 'npm install' from here to speed up your daily workflow.

View File

@@ -54,3 +54,4 @@ repos:
rev: 0.36.0
hooks:
- id: check-renovate
- id: check-github-actions