Commit Graph
49 Commits
Author SHA1 Message Date
github-actions[bot] 38ea820606 chore: auto-fix lint & formatting [skip ci] 2026-08-03 01:44:07 +00:00
RhenCloud 78f0a4e28a feat: edit existing messages for workflow run updates 2026-08-03 09:43:36 +08:00
RhenCloud 4b3f5189a8 fix(push): use commit message as link text 2026-08-03 09:29:15 +08:00
RhenCloud e01ce3505e fix(push): show commit links inline with messages 2026-08-03 09:25:13 +08:00
github-actions[bot] 5834861a8d chore: auto-fix lint & formatting [skip ci] 2026-08-03 01:19:33 +00:00
RhenCloud 55eafaeecc feat: link commit in check suite messages
Add clickable commit links in check_suite formatter output with fallback
URL when html_url is unavailable. Remove check_run from checks template
since formatter only handles check_suite events.
2026-08-03 09:19:00 +08:00
RhenCloud 5deff66b8d format: remove backticks from push commit short IDs 2026-08-03 09:11:28 +08:00
RhenCloud e2022de4bc refactor(push): extract commitField helper to reduce duplication 2026-08-03 09:09:56 +08:00
RhenCloud ac8b4a77b8 fix(dispatch): enforce match criteria for fallback routes 2026-08-03 08:35:47 +08:00
RhenCloud 80cc85cd76 fix: use variation selector-16 for star emoji 2026-08-03 08:31:51 +08:00
github-actions[bot] d6c15a32cd chore: auto-fix lint & formatting [skip ci] 2026-08-02 23:31:48 +00:00
RhenCloud b14b9f0bde feat: add locales and tests for workflow_job, status, ping formatters 2026-08-03 07:30:38 +08:00
RhenCloud 4f6b5929c1 docs: document Telegram richheader avatar card 2026-08-03 07:30:33 +08:00
RhenCloud 1fc3991332 feat: add formatters for workflow_job, status, deployment, ping 2026-08-03 07:30:29 +08:00
RhenCloud fc2e2c2efa feat(telegram): send author avatar as richheader link-preview card
Serve an OG page at /api/richheader and use a small link-preview card
(avatar + author name) above the message instead of sending a photo.
2026-08-03 07:30:25 +08:00
RhenCloud fb9550b94d feat: support check_suite webhook events 2026-08-03 07:25:21 +08:00
github-actions[bot] 7179a35457 chore: auto-fix lint & formatting [skip ci] 2026-08-02 22:47:32 +00:00
RhenCloud 50ae8c7607 feat(telegram): render markdown and send author avatar photo 2026-08-03 06:46:48 +08:00
github-actions[bot] 568e206643 chore: auto-fix lint & formatting [skip ci] 2026-08-02 21:19:33 +00:00
RhenCloud bd7a8f2632 feat: add Telegram push support with multi-target routes
Add a platform-aware route target system so a single route can forward
to several destinations at once (e.g. a Discord channel and a Telegram
group). Route.target becomes Route.targets[] with per-entry platform,
channelId/threadId for Discord and chatId/topicId for Telegram; the
legacy single-target format is normalized on load and accepted by the
admin API.

Implement the Telegram driver with HTML rendering and Bot API
sendMessage (chat_id + message_thread_id for topics, retry on 429/5xx),
plus /gh commands served over POST /telegram/webhook: login, logout,
comment, merge and close. The comment/merge/close commands resolve the
issue or PR from the replied-to notification message. OAuth binding now
stores a D1 telegram_links mapping and replies with a confirmation.

Sync the Telegram webhook from the scheduled trigger via setWebhook.
2026-08-03 05:19:05 +08:00
RhenCloud dcbe93be91 feat(admin): add detailed send log viewer with extended fields 2026-08-03 05:19:02 +08:00
RhenCloud 3a6a2cbbc5 feat: migrate send logs and discord links to D1 2026-08-03 05:18:58 +08:00
github-actions[bot] 5a98e45544 chore: auto-fix lint & formatting [skip ci] 2026-08-02 19:42:35 +00:00
RhenCloud 0af6b9a4b8 refactor: modularize into core/events/formatters/drivers 2026-08-03 03:36:36 +08:00
github-actions[bot] 7b341ff9f4 chore: auto-fix lint & formatting [skip ci] 2026-08-02 19:03:12 +00:00
RhenCloud d540d465d1 refactor: replace Discord Gateway DO with Interaction Endpoint 2026-08-03 03:02:42 +08:00
RhenCloud 9bb9cb1444 feat(formatter): show queued/running status for workflow and check runs 2026-08-03 01:53:10 +08:00
RhenCloud 809f89400b feat: add per-group emoji toggle and standardized embed titles 2026-08-03 01:25:03 +08:00
RhenCloud 49baf63a17 feat: add job field to workflow run notification 2026-08-03 01:19:46 +08:00
github-actions[bot] 2e4cb24c1d chore: auto-fix lint & formatting [skip ci] 2026-08-02 16:44:42 +00:00
RhenCloud 38daf7bc83 feat: ignore filters on fallback routes 2026-08-03 00:02:29 +08:00
RhenCloud bd33fa6835 fix: harden input validation, redirect safety, and error resilience 2026-08-02 23:56:58 +08:00
RhenCloud d419b9c940 feat: add fallback routes and repository event enrichment 2026-08-02 23:23:07 +08:00
RhenCloud 44b8fead78 feat: add merge/close PR buttons to Discord PR notifications 2026-08-02 23:02:37 +08:00
RhenCloud d40f34cc4d fix: skip validation for unchanged admin routes 2026-08-02 22:53:36 +08:00
RhenCloud d3c1349d00 feat(admin): group-centric console navigation and group-scoped routes API
Add GET/PUT /api/groups/:groupId/routes endpoints that filter and merge
routes by group (backend forces groupId from the path param). Rework the
console so the top level lists groups; entering a group shows and manages
only that group's routes. Drop the route-level group selector and the
now-redundant group badge on route cards.
2026-08-02 08:39:46 +08:00
RhenCloud 537f4cbb84 feat(admin): scope groups to specific GitHub orgs/users
Add an optional owners[] field to groups (super-admin only). When set,
only webhook events whose repository owner or organization login matches
enter that group's routes; empty owners means no restriction, keeping
existing routes backward compatible.

- types: Group.owners?, groups.ts groupAcceptsOwners()
- webhook.ts eventOwners() extracts repo owner + org login
- discord.ts dispatch skips routes whose group rejects the event owner
- admin-routes.ts validateGroups() validates owners list
2026-08-02 08:15:49 +08:00
RhenCloud 667b8038af feat(web): auto dark mode for terms and privacy pages
Tokenize the legal page palette into CSS variables and add a
prefers-color-scheme:dark override so /terms and /privacy follow the
device theme, matching the landing page and admin console.
2026-08-02 08:14:03 +08:00
RhenCloud c2b78bef69 feat(web): link landing docs button to the docs site
Point the homepage Documentation card at the hosted docs site
(https://webhooker.docs.worldexecute.me), language-aware: /zh for
Chinese and / for English. Still overridable via DOCS_URL.
2026-08-02 07:51:50 +08:00
RhenCloud 81d21ffb08 feat(web): add public landing page and move console to /admin
Serve a public landing page at / with buttons to the docs, GitHub repo,
Terms, Privacy and the admin login. Relocate the Nuxt admin console from
/ to /admin so the root is no longer the private console.

- add home-routes.ts (bilingual landing, auto dark mode, configurable
  DOCS_URL / GITHUB_REPO_URL) mounted at /
- move console to admin/pages/admin.vue; redirect / and unknown SPA
  routes to /admin
- point admin login/logout redirects at /admin
2026-08-02 07:40:14 +08:00
RhenCloud fc243811f0 feat(admin): add group-based access scoping for routes and logs
Introduce optional route groups so non-super admins can be delegated
edit/view access to a subset of routes and their send logs.

- add Group model and Route.groupId
- add groups.ts (load/save groups, resolveScope, permission helpers)
- scope /api/routes and /api/logs by the caller's accessible groups;
  add /api/me and /api/groups (group management is super-admin only)
- require a groupId on every route in validateRoutes
- allow group admins (not just super admins) to sign in to the console
2026-08-02 07:39:35 +08:00
RhenCloud 225d5b015e feat(legal): serve Terms of Service and Privacy Policy pages
Add bilingual (zh/en) /terms and /privacy pages served by the Worker for
configuring the Discord application's Terms of Service and Privacy Policy
URLs. Contact line is configurable via optional LEGAL_CONTACT env var.
2026-08-02 07:12:54 +08:00
RhenCloud d68aeb20d5 test: cover admin, discord REST, send logs, token-store links and dedup 2026-08-02 06:51:32 +08:00
RhenCloud befed0267a fix(webhook): dedup duplicate deliveries, cache HMAC key, pass ExecutionContext
Skip re-processing when the same X-GitHub-Delivery id is seen (KV, 300s TTL)
to stop double pushes when both an org and an App webhook target the worker.
Pass ExecutionContext through so dispatch runs via waitUntil instead of a
fire-and-forget that gets frozen. Cache the imported HMAC key per secret.
2026-08-02 06:51:20 +08:00
RhenCloud c75cc058fc feat(discord): comment on GitHub as the linked user via slash/context commands
Replace the App-identity !gh text command with native slash and message
context-menu commands. /gh login|logout link a Discord user to their GitHub
account; /gh comment add|edit|del and the right-click 'GitHub' commands open
a modal and create/edit/delete comments using the user's own OAuth token,
delegating permission checks to GitHub (surfacing 401/403/404). The gateway
registers guild commands on connect and handles interactions in the DO.
2026-08-02 06:50:53 +08:00
RhenCloud 407514f3c9 feat(admin): GitHub OAuth login, admin whitelist and Nuxt WebUI
Add an admin WebUI (Nuxt static SPA in admin/, served via the ASSETS
binding) for managing routes and viewing send logs. Access is gated by
GitHub OAuth plus an ADMIN_USER_IDS whitelist with cookie sessions
(admin-session.ts). Expose routes/logs CRUD API (admin-routes.ts), add a
discord-link mapping in token-store.ts, and mount admin routes with an
SPA assets fallback in the server.
2026-08-02 06:50:41 +08:00
RhenCloud cfdf37e273 feat(discord): make gateway optional with REST send path and send logs
Gateway is now an opt-in feature (DISCORD_GATEWAY_ENABLED); when disabled,
messages are delivered via the Discord REST API (discord-rest.ts) instead of
the Durable Object. Record per-route delivery results (send-log.ts) for the
WebUI. Configure assets binding, DO sqlite migration and cron trigger.
2026-08-02 06:50:09 +08:00
RhenCloud 4d5c90773d feat(config): switch to routes-only config, drop default channel
Remove hardcoded DEFAULT_ROUTES and Config.discord.defaultChannelId so
forwarding is driven entirely by user-defined routes (empty KV = no
forwarding). Add ADMIN_USER_IDS, DISCORD_GATEWAY_ENABLED and ASSETS to Env.
2026-08-02 06:49:56 +08:00
RhenCloud 512d4b01d5 initial commit 2026-07-24 21:48:50 +08:00