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
|
|
@ -12,10 +12,9 @@ set -euo pipefail
|
|||
# Load shared environment
|
||||
source "$(dirname "$0")/../lib/env.sh"
|
||||
|
||||
export WOODPECKER_SERVER="http://localhost:8000"
|
||||
# WOODPECKER_TOKEN loaded from .env via env.sh
|
||||
REPO="johba/harb"
|
||||
API="${WOODPECKER_SERVER}/api/repos/2"
|
||||
REPO="${CODEBERG_REPO}"
|
||||
API="${WOODPECKER_SERVER}/api/repos/${WOODPECKER_REPO_ID}"
|
||||
|
||||
api() {
|
||||
curl -sf -H "Authorization: Bearer ${WOODPECKER_TOKEN}" "${API}/$1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue