Commit graph

38 commits

Author SHA1 Message Date
41ad1a036b
chore: migrate package manager from npm to bun 2026-08-13 20:34:52 +08:00
cc3ccadc24
feat(filters): unified glob (*/?) and //-regex matching for all filter types 2026-08-13 18:44:13 +08:00
b139712a91
feat: migrate to Nuxt 4 (Nitro) and Tailwind CSS v3 2026-08-13 17:43:33 +08:00
f4959eebf8
feat(groups): allow renaming a group id
Add PUT /admin/api/groups/:id/rename (owner role) which re-points the group's routes, migrates the per-group webhook secret (tenant:{id}) and pending invites, and records an audit entry. The group editor's id field is now editable and the console renames first, then persists remaining edits under the new id.
2026-08-13 09:58:02 +08:00
39bb639883
feat(install): post-install setup flow with group bind choice
The GitHub App Setup URL now lands on /auth/github/install, which renders a choice page: bind the installation to a new inst-{id} group or to an existing group the signed-in user owns (owner role re-checked on POST /auth/github/install/bind). Adds an App-JWT helper (getInstallationAccount) to name the auto-created group, audit entries, a console toast, and keeps the installation.created webhook fallback.
2026-08-13 09:39:02 +08:00
b600f02027
feat: per-group webhook ingress, custom webhooks, GitHub App tenant isolation
Add POST /webhook/{groupId} with per-group secrets (KV tenant:{groupId}), a custom provider (X-WebHooker-Signature HMAC, arbitrary JSON -> custom events through the route pipeline), and GitHub App installation isolation (Group.installationId) with automatic provisioning on installation.created (inst-{id} groups or binding matching owners groups). Includes WebhookPanel admin UI, custom route template, docs and 157 passing tests.
2026-08-13 09:24:50 +08:00
0b078d938b
feat(groups): per-group webhook log channel (logTarget)
Add an optional Discord channel/thread or Telegram chat/topic (Group.logTarget) that receives a summary message per webhook the group's routes dispatched: event/action, repo, delivery id and per route×target OK/FAIL lines with green/red embed color. Validated by the admin API and editable in the group editor; docs and example config updated.
2026-08-13 08:36:46 +08:00
b35c2c2f90
feat(check_run): edit messages in place as the run progresses, like workflow_run
formatCheckRun now sets a stable updateKey (check_run:{repo}:{id}) so queued → in_progress → completed phases update the original message via KV msg:* tracking instead of posting new ones. Adds tests and syncs README/docs.
2026-08-13 06:47:30 +08:00
github-actions[bot]
3029b3468f chore: auto-fix lint & formatting [skip ci] 2026-08-11 16:52:11 +00:00
13ba1e019e
merge: resolve docs conflict with origin/main (auto-fix)
Merged the remote lint/formatting fix; kept the group-level lang row in the zh group schema table.
2026-08-12 00:50:28 +08:00
7e45b0a09c
feat(groups): configure message language per group instead of per route
Route.lang is removed; Group.lang now drives the message language for
every route in the group (default en, custom via KV i18n:<lang>).
dispatch.ts loads translations per group and falls back to en for
groups without a lang. Admin UI: GroupEditor gains the language field,
RouteEditor/RouteCard drop theirs; docs and config example updated.
2026-08-12 00:43:47 +08:00
github-actions[bot]
89b43b8b28 chore: auto-fix lint & formatting [skip ci] 2026-08-11 16:06:06 +00:00
c73b642504
feat(admin): deep-linkable console URLs, stop collapsing unknown paths to /admin
The root catch-all page ([...slug].vue) redirected every unknown URL to
/admin, and the worker fell back to the SPA for any path — so no matter
what page was opened, the URL ended up at baseurl/admin.

- Extract the console into ConsolePage.vue; the active tab now mirrors
  the URL path: /admin (groups), /admin/groups, /admin/logs, /admin/audit
  (tab switches use router.replace; unknown slugs render 404)
- admin.vue and admin/[slug].vue become thin wrappers
- Delete the root [...slug].vue catch-all redirect
- server.ts: notFound serves ASSETS (SPA + _nuxt chunks) only for
  /admin-prefixed paths; every other unknown URL returns a JSON 404
2026-08-12 00:05:20 +08:00
a0e15975df
fix(invites): list invites via per-group KV index instead of kv.list
Cloudflare KV's list operation is eventually consistent and can lag
behind a fresh write, so pending invites were invisible right after
creation (GET /admin/api/groups/:id/invites returned {invites: []}).
Keep a per-group token index (invite:group:{id}) updated on create,
revoke, accept and expiry; the members panel also inserts the freshly
created invite into the list immediately and copies the absolute link.
2026-08-11 23:53:58 +08:00
ce9f6147f1
docs: document roles, invites, audit log and self-signup
- configuration.md (en/zh): ALLOW_SELF_SIGNUP, AUDIT_RETENTION_DAYS,
  member schema, role table, invite/self-signup sections, invite KV key,
  audit_logs D1 table, new admin endpoints
- deployment.md (en/zh): migration list through 0005
- README (en/zh) and AGENTS.md: access model, invites, audit log
- config.example.yaml: members example; .env.example: new variables
- .gitignore: ignore local saas-roadmap.md
2026-08-11 23:38:50 +08:00
aec0d1a257 feat: add gitea/forgejo support 2026-08-11 22:01:04 +08:00
e1b1daac98 chore: remove dead code and unused dependencies
Cleans up stale implementation artifacts:
- Delete legacy `src/webhook.ts` (dead code per AGENTS.md)
- Delete admin composables `useMe.ts` and `useRoutes.ts`
- Remove unused dependencies `jose` and `yaml`
- Remove stale `Me` interface, `FILTER_LABELS`, `invalidateConfigCache`, and formatter re-exports
2026-08-11 16:31:13 +08:00
76ba2c0a89 feat: add Discord role mention support to routes 2026-08-11 15:48:44 +08:00
feada32e83 feat: add stop property to route for exclusive matching 2026-08-08 00:40:45 +08:00
wyf9
cb18683fb8
chore: add db:migrate scripts and document the D1 migration step
- Add npm scripts db:migrate (local) and db:migrate:prod (remote) for
  wrangler d1 migrations apply webhooker
- Document the D1 database creation + migration step in the deployment
  guides (README en/zh, docs en/zh) and AGENTS.md
- Note the d1 execute fallback for databases already migrated manually
2026-08-05 17:39:14 +08:00
wyf9
afe19795b1
docs: sync documentation with current codebase
- Update event formatter count 23 -> 28 (add ping, workflow_job, status, deployment, check_suite)
- Document Telegram support end-to-end (routes, /gh commands, richheader, secrets)
- Fix route schema to use targets array and group fields (owners, emoji)
- Correct KV/D1 storage layout (msg:*, i18n:*, D1 links/send_logs)
- Note GITHUB_APP_ID/GITHUB_PRIVATE_KEY are unused; drop legacy DISCORD_CHANNEL_ID/PORT/CONFIG_PATH
- Remove stale Docker deployment section
- Update color table, branch filter compatibility, admin API endpoints
- AGENTS.md: add Documentation section requiring doc updates after functional changes
2026-08-05 17:22:15 +08:00
wyf9
e343885272
fix(docs): full repo permissions in github app settings 2026-08-05 15:20:37 +08:00
github-actions[bot]
cd591d658a chore: auto-fix lint & formatting [skip ci] 2026-08-03 01:52:14 +00:00
2dcb684e94
docs: document workflow_run in-place message updates 2026-08-03 09:51:40 +08:00
github-actions[bot]
d6c15a32cd chore: auto-fix lint & formatting [skip ci] 2026-08-02 23:31:48 +00:00
4f6b5929c1
docs: document Telegram richheader avatar card 2026-08-03 07:30:33 +08:00
github-actions[bot]
568e206643 chore: auto-fix lint & formatting [skip ci] 2026-08-02 21:19:33 +00:00
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
3a6a2cbbc5
feat: migrate send logs and discord links to D1 2026-08-03 05:18:58 +08:00
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
d540d465d1
refactor: replace Discord Gateway DO with Interaction Endpoint 2026-08-03 03:02:42 +08:00
1fc702ceb4
docs: add filter tutorial and clarify exact matching rules 2026-08-03 00:39:52 +08:00
8c9720b1b3
docs: document admin groups, OAuth redirect, and API renames 2026-08-03 00:33:18 +08:00
44b8fead78
feat: add merge/close PR buttons to Discord PR notifications 2026-08-02 23:02:37 +08:00
d996dbe45d
docs: align VitePress site with REST send, optional gateway and slash commands
- deployment: drop DISCORD_CHANNEL_ID, add ADMIN_USER_IDS, PKCS#8 key note,
  applications.commands invite scope, and an optional Gateway section
- getting-started: PKCS#8 .dev.vars example, remove channel ID
- introduction: REST delivery, optional DiscordGateway DO, delivery dedup,
  /admin Web UI in architecture and data flow
- index: refresh Workers feature, add Web UI & slash commands feature
2026-08-02 07:02:40 +08:00
4349b24d2a
docs: document WebUI, optional gateway, routes-only config and slash commands 2026-08-02 06:51:41 +08:00
512d4b01d5
initial commit 2026-07-24 21:48:50 +08:00