Initial commit: SDLC Orchestrator replacing n8n
Lightweight Hono webhook router that receives Gitea events and creates Coder workspaces for each SDLC stage (analyse, architect, develop, review, test, rework, release, maintenance). Includes k8s manifests for deployment and the Coder workspace template moved from babble. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
export interface Config {
|
||||
/** Port for the HTTP server */
|
||||
port: number;
|
||||
/** Coder API base URL (e.g. https://coder.samson.media) */
|
||||
coderUrl: string;
|
||||
/** Coder API session token */
|
||||
coderToken: string;
|
||||
/** Coder template ID for workspaces */
|
||||
coderTemplateId: string;
|
||||
/** Gitea API token for the dev bot account */
|
||||
giteaDevToken: string;
|
||||
/** Gitea API token for the review bot account */
|
||||
giteaReviewToken: string;
|
||||
/** Anthropic API key passed to Claude Code in workspaces */
|
||||
anthropicApiKey: string;
|
||||
/** Username of the dev bot (to filter out self-replies) */
|
||||
botDevUsername: string;
|
||||
/** Username of the review bot (to filter out self-replies) */
|
||||
botReviewUsername: string;
|
||||
/** Gitea base URL (e.g. https://gitea.samson.media) */
|
||||
giteaUrl: string;
|
||||
/** Optional webhook secret for verifying Gitea signatures */
|
||||
webhookSecret?: string;
|
||||
}
|
||||
|
||||
function required(name: string): string {
|
||||
const value = process.env[name];
|
||||
if (!value) {
|
||||
throw new Error(`Missing required environment variable: ${name}`);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
export function loadConfig(): Config {
|
||||
return {
|
||||
port: parseInt(process.env.PORT || "3000", 10),
|
||||
coderUrl: required("CODER_URL"),
|
||||
coderToken: required("CODER_TOKEN"),
|
||||
coderTemplateId: required("CODER_TEMPLATE_ID"),
|
||||
giteaDevToken: required("GITEA_DEV_TOKEN"),
|
||||
giteaReviewToken: required("GITEA_REVIEW_TOKEN"),
|
||||
anthropicApiKey: required("ANTHROPIC_API_KEY"),
|
||||
botDevUsername: process.env.BOT_DEV_USERNAME || "claude-dev",
|
||||
botReviewUsername: process.env.BOT_REVIEW_USERNAME || "claude-review",
|
||||
giteaUrl: process.env.GITEA_URL || "https://gitea.samson.media",
|
||||
webhookSecret: process.env.WEBHOOK_SECRET,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user