Initial commit: GitHub-GCC WeCom bot for Gitea

This commit is contained in:
2026-09-17 17:43:45 +08:00
commit 74d9523652
18 changed files with 2908 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import type { AppConfig } from "../src/config.js";
export function testConfig(overrides: Partial<AppConfig> = {}): AppConfig {
return {
webhookSecret: "test-secret",
wecomWebhookUrl: "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=test-key",
maxMessageLength: 1800,
deliveryTtlSeconds: 600,
...overrides
};
}
export function testEnv(overrides: Record<string, unknown> = {}) {
return {
WEBHOOK_SECRET: "test-secret",
WECOM_WEBHOOK_URL: "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=test-key",
MAX_MESSAGE_LENGTH: "1800",
DELIVERY_TTL_SECONDS: "600",
...overrides
} as never;
}