refactor: make all scripts multi-project via env vars
Replace hardcoded harb references across the entire codebase: - HARB_REPO_ROOT → PROJECT_REPO_ROOT (with deprecated alias) - Derive PROJECT_NAME from CODEBERG_REPO slug - Add PRIMARY_BRANCH (master/main), WOODPECKER_REPO_ID env vars - Parameterize worktree prefixes, docker container names, branch refs - Genericize agent prompts (gardener, factory supervisor) - Update best-practices docs to use $-vars, prefix harb lessons All project-specific values now flow from .env → lib/env.sh → scripts. Backward-compatible: existing harb setups work without .env changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f16df6c53e
commit
90ef03a304
16 changed files with 117 additions and 116 deletions
23
.env.example
23
.env.example
|
|
@ -2,17 +2,23 @@
|
|||
# Copy to .env and fill in your values.
|
||||
# NEVER commit .env to the repo.
|
||||
|
||||
# ── Target project ────────────────────────────────────────────────────────
|
||||
CODEBERG_REPO=johba/yourproject # org/repo slug on Codeberg
|
||||
PROJECT_REPO_ROOT=/home/you/yourproject # local clone of the target repo
|
||||
PRIMARY_BRANCH=main # main or master
|
||||
# PROJECT_NAME=yourproject # optional — auto-derived from CODEBERG_REPO
|
||||
|
||||
# ── Auth tokens ───────────────────────────────────────────────────────────
|
||||
# Codeberg API token (read from ~/.netrc by default, override here if needed)
|
||||
# CODEBERG_TOKEN=
|
||||
|
||||
# Codeberg review bot token (separate account for formal reviews)
|
||||
REVIEW_BOT_TOKEN=
|
||||
|
||||
# Woodpecker CI API token
|
||||
# ── Woodpecker CI ─────────────────────────────────────────────────────────
|
||||
WOODPECKER_TOKEN=
|
||||
|
||||
# Woodpecker CI server URL
|
||||
WOODPECKER_SERVER=http://localhost:8000
|
||||
WOODPECKER_REPO_ID=2 # numeric repo ID in Woodpecker DB
|
||||
|
||||
# Woodpecker Postgres (for direct DB queries)
|
||||
WOODPECKER_DB_PASSWORD=
|
||||
|
|
@ -20,12 +26,5 @@ WOODPECKER_DB_USER=woodpecker
|
|||
WOODPECKER_DB_HOST=127.0.0.1
|
||||
WOODPECKER_DB_NAME=woodpecker
|
||||
|
||||
# Target Codeberg repo
|
||||
CODEBERG_REPO=johba/harb
|
||||
CODEBERG_API=https://codeberg.org/api/v1/repos/johba/harb
|
||||
|
||||
# Harb repo local path
|
||||
HARB_REPO_ROOT=/home/debian/harb
|
||||
|
||||
# Claude CLI timeout (seconds)
|
||||
CLAUDE_TIMEOUT=7200
|
||||
# ── Tuning ────────────────────────────────────────────────────────────────
|
||||
CLAUDE_TIMEOUT=7200 # max seconds per Claude invocation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue