Commit graph

95 commits

Author SHA1 Message Date
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
11b74aa82a
feat(admin-ui): members panel, invite links, audit tab and role-aware console
- New MembersPanel: role switching, add/remove members, invite-link
  generation with copy/revoke, pending invite list
- New Audit tab (AuditLog.vue) with group filter
- Role-aware UI: viewer hides route/group edit actions (RouteCard readonly),
  owner-only controls, role badge + member count on group cards
- GroupEditor: members managed via panel, owners field super-admin only
- en/zh i18n and CSS for the new panels
2026-08-11 23:38:33 +08:00
252f6f181a
test: cover member roles, invite lifecycle and audit log 2026-08-11 23:37:34 +08:00
9b8533cabc
feat(admin): role-based group members (owner/admin/viewer), invites and audit log
- Group model: members[] with roles owner/admin/viewer; legacy adminIds
  resolve to owners (backward compatible); last-owner and self-demotion
  guards
- Unified permission middleware (src/web/auth.ts): requireAnyAccess,
  requireGroup(Role), bearerAuthMiddleware replace per-route loadScope
- Single-use 7-day invite links (invite:{token}); accept via /admin/invite
  or the OAuth callback; self-signup personal group via ALLOW_SELF_SIGNUP
- D1 audit_logs (migration 0005): login/logout, group/route/member/invite
  changes; GET /admin/api/audit; scheduled prune after AUDIT_RETENTION_DAYS
- Env: ALLOW_SELF_SIGNUP, AUDIT_RETENTION_DAYS
2026-08-11 23:37:19 +08:00
f8cb3a4ddb
fix(admin): pass group filter to send-log API on refresh/filter 2026-08-11 22:22:37 +08:00
github-actions[bot]
71a5202c03 chore: auto-fix lint & formatting [skip ci] 2026-08-11 14:01:51 +00:00
aec0d1a257 feat: add gitea/forgejo support 2026-08-11 22:01:04 +08:00
github-actions[bot]
ace036c209 chore: auto-fix lint & formatting [skip ci] 2026-08-11 09:51:03 +00:00
52d136c468 fix(push): link commit hash and render message as plain text 2026-08-11 17:50:20 +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
github-actions[bot]
869d84d78c chore: auto-fix lint & formatting [skip ci] 2026-08-08 16:53:44 +00:00
9f875e3180 fix: align PR button custom_id with parser, secure token deletion, load zh locale 2026-08-09 00:13:02 +08:00
589558a20d feat: add group filter to send logs view
- Add groupId query param to GET /api/logs endpoint
- Add group filter dropdown in SendLogs component
- Pass groups list and filter state from admin.vue
- Update useLogs.ts to accept optional groupId parameter
- Add groupId to SendRecord type
- Add i18n keys and CSS for filter UI
2026-08-08 23:09:06 +08:00
03eef7ae89 fix: allow duplicate route IDs across groups and add group_id to send_logs
- Change validateRoutes to per-group ID uniqueness instead of global
- Remove post-merge cross-group route ID uniqueness checks
- Include groupId in msg:* KV key to prevent collision
- Add group_id column to send_logs table (migration 0004)
- Record groupId in send_logs for accurate permission filtering
- Use groupId from log entries for admin log access checks
2026-08-08 23:00:15 +08:00
ab98c84896 feat(admin): add stop toggle and badge to route editor UI 2026-08-08 00:54:13 +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
68cda9f178
chore: remove v2 migration for DiscordGateway deletion from wrangler.jsonc 2026-08-05 16:21:55 +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]
38ea820606 chore: auto-fix lint & formatting [skip ci] 2026-08-03 01:44:07 +00:00
78f0a4e28a
feat: edit existing messages for workflow run updates 2026-08-03 09:43:36 +08:00
4b3f5189a8
fix(push): use commit message as link text 2026-08-03 09:29:15 +08:00
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
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
5deff66b8d
format: remove backticks from push commit short IDs 2026-08-03 09:11:28 +08:00
e2022de4bc
refactor(push): extract commitField helper to reduce duplication 2026-08-03 09:09:56 +08:00
7ee1e5899f
feat(admin): add route reordering with up/down buttons 2026-08-03 08:40:59 +08:00
ac8b4a77b8
fix(dispatch): enforce match criteria for fallback routes 2026-08-03 08:35:47 +08:00
80cc85cd76
fix: use variation selector-16 for star emoji 2026-08-03 08:31:51 +08:00
bec48233fa
refactor(admin): narrow workflows template filter to workflow_run 2026-08-03 08:24:31 +08:00
a001efea5f
feat(admin): add route templates to editor 2026-08-03 08:16:34 +08:00
github-actions[bot]
d6c15a32cd chore: auto-fix lint & formatting [skip ci] 2026-08-02 23:31:48 +00:00
b14b9f0bde
feat: add locales and tests for workflow_job, status, ping formatters 2026-08-03 07:30:38 +08:00
4f6b5929c1
docs: document Telegram richheader avatar card 2026-08-03 07:30:33 +08:00
1fc3991332
feat: add formatters for workflow_job, status, deployment, ping 2026-08-03 07:30:29 +08:00
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
be50d23319
refactor(admin): use target-row grid for target inputs 2026-08-03 07:30:07 +08:00
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
50ae8c7607
feat(telegram): render markdown and send author avatar photo 2026-08-03 06:46:48 +08:00