Commit graph

160 commits

Author SHA1 Message Date
a77ac8ad91
fix: allow editing filters on fallback routes 2026-08-24 22:51:36 +08:00
9899cd01bf
fix(telegram): render HTML with markdown-it and strip HTML from Discord bodies 2026-08-24 22:51:26 +08:00
ea049e28c9
docs: add CONTRIBUTING.md 2026-08-24 22:51:24 +08:00
2807c97c5f
feat(filters): fragment presets and code-block send log detail 2026-08-24 22:51:22 +08:00
c090281cb2
feat(filters): JSONPath field filters, operators, AST groups, fragments, and test-match
Add a field filter type reading any payload value by JSONPath with array expansion, 12 comparison operators (eq/ne/contains/startsWith/endsWith/regex/gt/gte/lt/lte/in/exists), a visual AST builder (all/any/not) in the route editor, chip-based multi-value input, a stateless POST /admin/api/test-match dry-run, and named filter fragments stored in D1 (d1_fragments, migration 0010) inlined into route ASTs on insert.
2026-08-24 22:51:20 +08:00
c955db03c3
feat(logs): populate send log detail and fix dedup re-claim condition
- dispatch: attach per-send detail (title/url/description/match/provider)
  so the admin log view shows message context, not just a bare ok flag
- idempotency: compare dedup expiry against claimed_at instead of the new
  expires_at so non-expired duplicates are rejected and expired keys re-claim
2026-08-24 22:51:11 +08:00
c6198e855f
chore: add MIT LICENSE file
Signed-off-by: RhenCloud <i@rhen.cloud>
2026-08-18 13:56:34 +08:00
github-actions[bot]
7c37f5d8b6 chore: auto-fix lint & formatting [skip ci] 2026-08-17 07:51:36 +00:00
9eeafb8c15
chore(config): make R2 payload binding optional
Comment out the PAYLOAD bucket binding so deploys do not require R2;
the worker already falls back to KV queue:payload:* when env.PAYLOAD is unset.
2026-08-17 15:09:24 +08:00
25ebae4ae5
feat(storage): migrate config, dedup and delivery state to D1
- Move oversized queue payloads from KV to R2 (PAYLOAD binding, webhooks/YYYY/MM/DD/*.json, KV queue:payload:* fallback)
- Persist routes/groups to D1 (d1_routes/d1_groups) with memory -> KV -> D1 three-tier cache, seeded from legacy KV config keys
- Move webhook dedup (dedup_keys), delivery state (delivery_state) and message tracking (message_tracking) to D1 via canUseD1 probe with automatic KV fallback
- Batch send_logs inserts (recordSendBatch) and add group_id/ts index
- Add storage-prune scheduled task for expired dedup/state/tracking rows
- Add TTL to invite:group:{id} index and audit all ephemeral KV keys
- Add D1 indexes for the new tables
- Sync AGENTS.md, README.md/zh and docs/ (en/zh) with the new storage layout
2026-08-17 15:01:20 +08:00
2e1b0f022e
fix(ci): run tests sequentially to avoid global state pollution 2026-08-17 10:59:32 +08:00
github-actions[bot]
b7a100a4a8 chore: auto-fix lint & formatting [skip ci] 2026-08-16 16:02:49 +00:00
2975087262
fix(push): link branch ref in title as inline code 2026-08-17 00:01:32 +08:00
github-actions[bot]
3bcc98efc8 chore: auto-fix lint & formatting [skip ci] 2026-08-16 14:47:01 +00:00
df0edbb581
refactor(push): move commits to description, comparison to changes field 2026-08-16 22:46:11 +08:00
47d7c9105b
feat(ui): update ui style 2026-08-16 22:46:07 +08:00
github-actions[bot]
ca6dfd3f64 chore: auto-fix lint & formatting [skip ci] 2026-08-15 11:24:23 +00:00
3f1672d218
chore: update bindings in wrangler.jsonc 2026-08-15 19:23:33 +08:00
af2b22d65c
chore(types): drop dead Env fields (DISCORD_CHANNEL_ID, DOCS_URL, GITHUB_REPO_URL, LEGAL_CONTACT) 2026-08-15 18:43:38 +08:00
7ac7bb7958
fix(render): link title head to the event object URL 2026-08-15 18:25:23 +08:00
2f8a87048e
feat(formatters): add updateKey for suite/deployment/comment edit-in-place 2026-08-15 18:18:52 +08:00
3af50496a7
fix(formatters): strip HTML from comment bodies so bot notifications render cleanly 2026-08-15 17:55:38 +08:00
fa227b1533
fix(admin): wire /admin/login, /admin/logout and /admin/invite routes 2026-08-15 17:44:20 +08:00
320e825bf8
chore(quality): provider fixtures, formatter snapshots, platform contract tests, CI, CodeQL, dependabot 2026-08-15 17:30:51 +08:00
04fa52db52
chore(deps): remove @nuxt/kit override and update lockfile 2026-08-15 17:10:14 +08:00
github-actions[bot]
a1ee756d1d chore: auto-fix lint & formatting [skip ci] 2026-08-15 09:04:41 +00:00
1e9ba3c5dd
feat(observability): delivery metrics, admin metrics/delivery endpoints, admin API route wiring 2026-08-15 17:03:45 +08:00
2470bd786d
feat(config): valibot schemas, schema version, migrations, filter AST 2026-08-15 17:03:42 +08:00
eaec039ad4
refactor(core): message tracker abstraction and formatter plugin registry 2026-08-15 17:03:39 +08:00
486f38365f
feat(queue): async delivery via Cloudflare Queues with retry backoff and DLQ 2026-08-15 17:03:35 +08:00
737dd7af98
feat(reliability): idempotency store, custom webhook replay protection, correlation ids
Add LICENSE (MIT), an IdempotencyStore abstraction with a KV implementation and provider-scoped delivery keys, optional replay protection for custom webhooks (X-WebHooker-Timestamp + X-WebHooker-Nonce), and per-request correlation ids in webhook responses and logs.
2026-08-15 17:03:32 +08:00
github-actions[bot]
92ba2203a5 chore: auto-fix lint & formatting [skip ci] 2026-08-15 04:05:25 +00:00
7ebd9aa63f
fix: prevent race conditions with KV locks in dispatch and group provisioning 2026-08-15 12:04:37 +08:00
github-actions[bot]
17eefd3c8e chore: auto-fix lint & formatting [skip ci] 2026-08-14 01:01:12 +00:00
c982356e0c
fix(formatters): use raster PNG forge icons Discord renders
- GitHub footer icon now uses fluidicon.png instead of favicon.ico —
  Discord silently drops .ico embed footer icons (png/jpg/webp/gif only)
- Gitea instances use {origin}/assets/img/favicon.png (verified on
  codeberg.org and gitea.com); links are still derived from the repo URL
- tests + docs updated to the new icon URLs
2026-08-14 08:59:51 +08:00
github-actions[bot]
c58b800987 chore: auto-fix lint & formatting [skip ci] 2026-08-14 00:51:23 +00:00
3f6f7f17b5
feat(groups): host-based forge sources with optional display name
- forgeSources entries are now { host, type, name? }: the repository URL's
  hostname is matched case-insensitively against host (github.com for GitHub,
  distinct hosts for multiple Gitea instances); the footer label is the
  optional name, falling back to the host
- GroupEditor renders one row per source: host input + type select + optional
  display name (grid layout); hostname validation mirrors the server
- fix: apiFetch sends Content-Type: application/json — h3's readBody only
  parses JSON bodies with that header, so every PUT/POST from the refactored
  console arrived as a raw string and failed with 'groups must be an array'
- hardening: readJsonBody (admin + actions) JSON-parses string bodies so curl
  and older clients without the content-type header still work
- regression test: groups PUT without content-type + forgeSources round-trip
- docs: groups.md/message-format.md (en/zh), AGENTS.md, config.example.yaml
2026-08-14 08:49:48 +08:00
github-actions[bot]
17d10db845 chore: auto-fix lint & formatting [skip ci] 2026-08-14 00:10:56 +00:00
3dce114cec
feat(groups): optional forge source label in message footers
- Group.forgeLabel (default off, editable per group in the console) shows the
  source forge on every message the group's routes dispatch
- Discord embed footer: forge name next to the repo + the site's favicon as
  icon_url (Gitea instance's own favicon from its origin)
- Telegram footer: hyperlinked site name (GitHub or Gitea hostname); custom
  webhooks render a plain 'Custom' label
- forgeInfo() derives branding from event.provider + repository.html_url;
  dispatch attaches it to the NeutralMessage like mentionRoleIds
- validateGroups accepts forgeLabel booleans; GroupEditor gains the toggle
- tests: forgeInfo unit, discord/telegram footer render, dispatch on/off
- docs: groups.md + message-format.md (en/zh), config.example.yaml, AGENTS.md
- fix: wrangler.jsonc compatibility_date was an incomplete '2026-'
2026-08-14 08:10:04 +08:00
a5324fb0ea
fix(formatters): localize PR buttons, cap oversized content, dedupe status logic
- PR merge/close button labels now follow the group language (actions.merge/close)
  instead of hardcoded Chinese
- clamp content to Discord embed limits (title 256, description 4096, field value
  1024, 25 fields) in formatters plus a render-layer safety net; Telegram gets a
  tag-safe 4096-char cap (capHtml closes dangling tags)
- raise commit subject truncation from 72 to 200 chars (MAX_COMMIT_SUBJECT)
- extract workflowStatus/workflowRunStatus/statusColorKey helpers shared by
  check_run/check_suite/workflow_run/workflow_job
- dedupe deployment ref/sha fields via addDeploymentRefFields
- commit_comment without a commit id uses title_plain (no dangling ???????)
- tag pushes now report 'Tag created'; zh push title includes the {ref}
- sender profile link derives from the repo's forge origin instead of github.com
- group webhook log emoji injected via emojiPrefix, removed from locale files
- dispatchEvent accepts preloaded groups (single KV read per webhook)
- webhook 401 logs distinguish 'secret not configured' from 'invalid signature'
2026-08-14 07:41:19 +08:00
e59b10f739
refactor(admin): unify webui fetch/copy/format helpers; fix audit tab load and delete-group count
- apiFetch + shared needLogin (any 401 shows the login card) replaces six
  duplicated fetch/401/error-handling blocks in the admin composables
- useCopy composable: clipboard + execCommand fallback with timed reset,
  used by MembersPanel and WebhookPanel
- utils/format.ts (fmtTime/splitList/parseMatch) removes inline duplicates
  across SendLogs, AuditLog, RouteEditor and GroupEditor
- fix: load the audit log when the audit tab becomes active (client-side
  navigation never remounted the page, leaving the list empty on first visit)
- fix: fetch the real route count for a group before confirming deletion
  instead of reusing the currently open group's route list
2026-08-14 07:18:55 +08:00
c438fe96dc
Merge branch 'main' of https://github.com/ReCloudStudio/WebHooker 2026-08-14 06:52:17 +08:00
44f534e71d
fix(docs): standalone tsconfig for vitepress config loading 2026-08-14 06:52:05 +08:00
github-actions[bot]
811f8646e0 chore: auto-fix lint & formatting [skip ci] 2026-08-13 22:46:35 +00:00
6f1a334150
merge: resolve conflicts with origin/main (auto-fix formatting) 2026-08-14 06:45:15 +08:00
a9e50fba50
docs: restructure into core-concept pages and split admin API 2026-08-14 06:41:08 +08:00
db49e1f01c
docs: fix factual errors, fill coverage gaps and align zh mirror 2026-08-14 06:17:13 +08:00
github-actions[bot]
df51b71121 chore: auto-fix lint & formatting [skip ci] 2026-08-13 12:37:09 +00:00
41ad1a036b
chore: migrate package manager from npm to bun 2026-08-13 20:34:52 +08:00
cf65111e4e
fix(formatters): dedupe push count line, link workflow run name to actions 2026-08-13 19:37:20 +08:00