feat: sync ghbot-Nodeloc v1.2.0 capabilities into upstream
Merges all 33 commits from lza6/ghbot-Nodeloc (v1.0.0 through v1.2.0) while keeping both sides' features in every conflicted file: - EventRouter dispatch extracted from runReview.ts (7.1), with the runtime environment block preserved on the review-start comment - Unified command ack messages (6.3) combined with the collapsed runtime environment block and bot signature on /recheck replies - Status banner and collapsible unposted findings in review bodies (6.1) - Centralized runtime directories behind GHBOT_RUNTIME_DIR (D-13); webhook knowledge cache now lives under tempRootDirectory() - Production hardening for merge races, timeouts, webhook ops; atomic temp-file rename for R2 cache restores kept from upstream - Webhook parity retained: triage events gated by WEBHOOK_TRIAGE_ENABLED, read-only command guidance, repository knowledge injection, runtime environment block on webhook chat replies - Sanitization/secret redaction centralization, error-aware retry, duplicate merge prevention, in-process webhook retries, /metrics - Infra: eslint/prettier gates with CI verify workflow, docs archives typecheck, eslint, prettier format:check, and 164 tests all pass.
This commit is contained in:
commit
9e47ab339e
180 files changed
+15130
-1209
No files matched your search
@@ -17,12 +17,18 @@ test("actions mode reports trigger, runner, goose, policy, automation, cache", (
|
||||
process.env.GITHUB_EVENT_NAME = "pull_request_target";
|
||||
try {
|
||||
const body = formatRuntimeEnvironmentDetails("actions");
|
||||
assert.match(body, /- \*\*Mode:\*\* GitHub Actions \(\`pull_request_target\`\)/);
|
||||
assert.match(body, /- \*\*Mode:\*\* GitHub Actions \(`pull_request_target`\)/);
|
||||
assert.match(body, /- \*\*Runner:\*\* .+ · Node\.js v/);
|
||||
assert.match(body, /- \*\*goose:\*\* model \`[^\`]+\` · thinking effort \`[^\`]+\`/);
|
||||
assert.match(body, /- \*\*Review policy:\*\* \`(allow|require_approval|reject)\` · strictness \`(normal|strict)\`/);
|
||||
assert.match(body, /- \*\*goose:\*\* model `[^`]+` · thinking effort `[^`]+`/);
|
||||
assert.match(
|
||||
body,
|
||||
/- \*\*Review policy:\*\* `(allow|require_approval|reject)` · strictness `(normal|strict)`/
|
||||
);
|
||||
assert.match(body, /- \*\*Automation:\*\* auto-merge (on|off) · conflict repair (on|off)/);
|
||||
assert.match(body, /- \*\*Cache:\*\* R2 (enabled|disabled) · repository knowledge (enabled|disabled)/);
|
||||
assert.match(
|
||||
body,
|
||||
/- \*\*Cache:\*\* R2 (enabled|disabled) · repository knowledge (enabled|disabled)/
|
||||
);
|
||||
} finally {
|
||||
if (previousEvent === undefined) {
|
||||
delete process.env.GITHUB_EVENT_NAME;
|
||||
@@ -39,8 +45,11 @@ test("webhook mode keeps the identical template but swaps in service facts", ()
|
||||
assert.match(webhookBody, /^<details>\n<summary>⚙️ Runtime environment<\/summary>/);
|
||||
assert.match(webhookBody, /- \*\*Mode:\*\* GitHub App webhook service \(read-only chat\)/);
|
||||
assert.match(webhookBody, /- \*\*Host:\*\** .+Node\.js v/);
|
||||
assert.match(webhookBody, /- \*\*Chat permission policy:\*\* \`(anyone|read|write)\`/);
|
||||
assert.match(webhookBody, /- \*\*Tools:\*\* none · cannot edit files, run commands, or push commits/);
|
||||
assert.match(webhookBody, /- \*\*Chat permission policy:\*\* `(anyone|read|write)`/);
|
||||
assert.match(
|
||||
webhookBody,
|
||||
/- \*\*Tools:\*\* none · cannot edit files, run commands, or push commits/
|
||||
);
|
||||
assert.doesNotMatch(webhookBody, /GitHub Actions|Review policy|Runner:/);
|
||||
|
||||
const summaryOf = (body: string) => body.split("\n").slice(0, 2).join("\n");
|
||||
|
||||
Reference in new issue
Block a user