mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
fix: link only the repo head in message titles, keep the subject plain
This commit is contained in:
parent
84d8a5384d
commit
dfb65ef70d
7 changed files with 75 additions and 15 deletions
|
|
@ -136,9 +136,14 @@ tests/ # bun test unit tests (webhook, formatter, discord, tel
|
|||
|
||||
## Message Format Spec
|
||||
|
||||
- Every embed title must start with the repo, then optional `#number`, then `: subject`:
|
||||
- Every message title must start with the repo, then optional `#number`, then `: subject`:
|
||||
`{repo}{#number}: {subject}` (e.g. `acme/widget#7: Add feature`). Repo comes from
|
||||
`payload.repository.full_name`; fall back to `t("common.repository")` when missing.
|
||||
- Only the repo head is hyperlinked (never the whole title). Drivers split the title via
|
||||
`splitMessageTitle`/`repoUrlFromMessage` (`server/lib/formatters/helpers.ts`): the Discord
|
||||
embed title is `{repo}{#number}` linked to the repository URL and `: {subject}` renders as
|
||||
the first description line; Telegram keeps the one-line title with an inline repo link and
|
||||
a plain subject. Messages without a `: ` separator keep the legacy whole-title link.
|
||||
- Do NOT use `"Comment on org/repo"` / `"Review on org/repo"` prefixes. Comments, reviews
|
||||
and inline comments use the same `{repo}{#number}: {title}` title as their parent object.
|
||||
- All event-specific emoji live in `server/lib/formatters/` (via the `emojiPrefix` helper), never in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue