mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
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.
97 lines
2.8 KiB
YAML
97 lines
2.8 KiB
YAML
# Routes
|
|
# Each route defines a filter chain and one or more target destinations
|
|
# (Discord channel/thread and/or Telegram chat/topic). See docs/guide/configuration.md.
|
|
|
|
# Groups scope admin access and can restrict which org/user events flow in.
|
|
groups:
|
|
- id: default
|
|
name: "Default"
|
|
# Members with roles (owner / admin / viewer); legacy adminIds still work and are treated as owners.
|
|
members:
|
|
- login: "your-github-id"
|
|
role: owner
|
|
# owners: ["myorg"] # restrict events to this org/user (optional)
|
|
# providers: ["github", "gitea"] # restrict to source platforms (optional; empty = all)
|
|
# emoji: true # include emoji in messages (default true)
|
|
# lang: "en" # message language for this group's routes (en/zh, default en)
|
|
|
|
routes:
|
|
- id: all-push
|
|
name: "All Push Events"
|
|
enabled: true
|
|
groupId: default
|
|
filters:
|
|
- type: event
|
|
match: push
|
|
targets:
|
|
- platform: discord
|
|
channelId: "CHANNEL_ID_HERE"
|
|
|
|
# - id: specific-repo
|
|
# name: "Specific Repo"
|
|
# enabled: true
|
|
# groupId: default
|
|
# filters:
|
|
# - type: repo
|
|
# match: "org/repo"
|
|
# - type: event
|
|
# match: [pull_request, issues]
|
|
# targets:
|
|
# - platform: discord
|
|
# channelId: "CHANNEL_ID_HERE"
|
|
# threadId: "THREAD_ID_HERE"
|
|
# - platform: telegram
|
|
# chatId: "-1001234567890"
|
|
# topicId: "9876543210"
|
|
|
|
# - id: exclude-bot
|
|
# name: "Exclude Bot Actions"
|
|
# enabled: true
|
|
# groupId: default
|
|
# filters:
|
|
# - type: actor
|
|
# match: "[bot]"
|
|
# exclude: true
|
|
# targets:
|
|
# - platform: discord
|
|
# channelId: "CHANNEL_ID_HERE"
|
|
|
|
# Discord role mentions: when this route fires, the listed role ids are
|
|
# pinged in every Discord target (Telegram targets ignore this field).
|
|
# - id: mention-on-release
|
|
# name: "Mention Roles on Release"
|
|
# enabled: true
|
|
# groupId: default
|
|
# discordRoleIds: ["111111111111111111", "222222222222222222"]
|
|
# filters:
|
|
# - type: event
|
|
# match: release
|
|
# - type: action
|
|
# match: published
|
|
# targets:
|
|
# - platform: discord
|
|
# channelId: "CHANNEL_ID_HERE"
|
|
|
|
# Fallback routes only fire when no other (non-fallback) route matched.
|
|
# - id: fallback-all
|
|
# name: "Fallback: everything else"
|
|
# enabled: true
|
|
# groupId: default
|
|
# fallback: true
|
|
# filters: []
|
|
# targets:
|
|
# - platform: telegram
|
|
# chatId: "-1001234567890"
|
|
|
|
# Stop routes stop processing further routes when matched.
|
|
# - id: exclusive-push
|
|
# name: "Exclusive Push"
|
|
# enabled: true
|
|
# groupId: default
|
|
# stop: true
|
|
# filters:
|
|
# - type: event
|
|
# match: push
|
|
# targets:
|
|
# - platform: discord
|
|
# channelId: "CHANNEL_ID_HERE"
|