Files
ghbot/.env.example
T
lezi-fun a6e3fd2fc5 feat: bring webhook mode closer to action mode
Webhook deliveries now run the same issue and PR triage as action mode on open/edit/reopen events, gated by WEBHOOK_TRIAGE_ENABLED; @bot answers embed the host-curated repository knowledge cache from R2 (never the uninitialized scaffold); exact /recheck and /conflict commands get a guidance reply pointing to action mode instead of silence. Cache restores write through a temporary file and rename so concurrent webhook work never reads a partial object. Documents that all webhook local writes stay inside the current working directory.
2026-08-22 11:36:46 +08:00

68 lines
2.4 KiB
Bash

PORT=3000
# Optional in GitHub Actions because github.token is injected automatically.
# Still useful for local simulation and as a GitHub App fallback.
GITHUB_TOKEN=ghp_your_token_here
GH_APP_ID=
GH_APP_PRIVATE_KEY=
GH_APP_INSTALLATION_ID=
# Optional GitHub App webhook chat mode. Action mode remains the default and
# does not require these values. Set WEBHOOK_ENABLED=true only for a separate
# long-running Node/Docker webhook service.
WEBHOOK_ENABLED=false
WEBHOOK_SECRET=
WEBHOOK_PATH=/webhooks/github
# anyone | read | write. In "read" mode, organization members can also ask on
# organization-owned repositories; personal repositories still use collaborator access.
WEBHOOK_CHAT_PERMISSION=read
WEBHOOK_QUEUE_CONCURRENCY=2
WEBHOOK_QUEUE_LIMIT=500
# Automatic issue/PR triage (labels + duplicate detection) in webhook mode.
WEBHOOK_TRIAGE_ENABLED=true
# GitHub App login or slug used in @mentions, e.g. forumlify[bot].
BOT_NAME=ghbot
# goose uses this OpenAI-compatible Chat Completions endpoint.
GOOSE_API_KEY=sk-...
GOOSE_BASE_URL=https://api.openai.com/v1
GOOSE_MODEL=gpt-5.4
GOOSE_THINKING_EFFORT=high
# Optional: the pinned goose CLI version, shown in the runtime environment block.
# GOOSE_VERSION=v1.46.0
# allow | require_approval | reject. Ordinary review notes pass by default.
REVIEW_POLICY=allow
# normal | strict. Only strict enables the thorough review prompt.
REVIEW_STRICTNESS=normal
# Optional repository-specific review rules.
REVIEW_INSTRUCTIONS=
# Comma-separated PR base-branch globs. Empty means all base branches.
REVIEW_BRANCHES=
# Persist repository knowledge in the configured private cache. Authorized @bot agents
# can improve it only when write is explicitly enabled.
REPOSITORY_KNOWLEDGE_ENABLED=true
REPOSITORY_KNOWLEDGE_WRITE=false
# Optional Cloudflare R2 persistent storage. Configure all credential values
# together. R2_PREFIX is an optional safe object-key namespace.
R2_ENDPOINT=https://ACCOUNT_ID.r2.cloudflarestorage.com
R2_BUCKET_NAME=ghbot-cache
R2_PREFIX=
R2_ACCESS_KEY_ID=
R2_SECRET_ACCESS_KEY=
TRIAGE_ENABLED=true
TRIAGE_LABELS=bug,enhancement,documentation,question,maintenance
TRIAGE_DUPLICATE_LABEL=duplicate
TRIAGE_CANDIDATE_LIMIT=50
TRIAGE_INSTRUCTIONS=
AUTO_MERGE=false
AUTO_RESOLVE_CONFLICTS=false
# Optional trusted shell command run after AI conflict resolution and before push.
CONFLICT_TEST_COMMAND=
MERGE_METHOD=squash
REQUIRE_CHECKS=true
MAX_PATCH_CHARS=120000
LOG_LEVEL=info