mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
docs: fix factual errors, fill coverage gaps and align zh mirror
This commit is contained in:
parent
41ad1a036b
commit
db49e1f01c
35 changed files with 912 additions and 316 deletions
|
|
@ -1,46 +1,47 @@
|
|||
# Supported Events
|
||||
|
||||
WebHooker supports 28 GitHub webhook event types, each with a dedicated formatter that produces rich Discord embeds and Telegram HTML messages. Unsupported events fall through to a generic formatter.
|
||||
WebHooker supports 28 GitHub webhook event types, each with a dedicated formatter that produces rich Discord embeds and Telegram HTML messages — plus `custom` events from signed custom JSON webhooks. Unsupported events fall through to a generic formatter.
|
||||
|
||||
## Events Table
|
||||
|
||||
| Event | Description | Embed Highlights |
|
||||
| ----------------------------- | ------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| `push` | Code pushed to a branch | Commit list, branch, author, diff stats |
|
||||
| `pull_request` | PR opened/closed/merged/edited | PR title, branch, diff stats, labels |
|
||||
| `issues` | Issue opened/closed/edited | Issue title, labels, assignees |
|
||||
| `issue_comment` | Comment on issue or PR | Comment body, issue reference |
|
||||
| `workflow_run` | CI/CD workflow phase updated | Workflow status, conclusion, duration; phases update a single message in place |
|
||||
| `workflow_job` | CI job phase updated | Job name, status, conclusion, workflow |
|
||||
| `status` | Commit status updated | Commit status, context, state, commit link |
|
||||
| `deployment` | Deployment created | Environment, ref, task |
|
||||
| `deployment_status` | Deployment status updated | Environment, status, commit ref |
|
||||
| `check_run` | Check run phase updated | Status, conclusion, details URL; phases update a single message in place |
|
||||
| `check_suite` | Check suite completed | Suite conclusion, head branch, commit link |
|
||||
| `ping` | Webhook confirmation | Webhook confirmation, event types subscribed |
|
||||
| `release` | Release published/edited | Tag, body, assets, pre-release flag |
|
||||
| `create` | Branch or tag created | Ref name, ref type |
|
||||
| `delete` | Branch or tag deleted | Ref name, ref type |
|
||||
| `star` | Repository starred/unstarred | Star count, action |
|
||||
| `fork` | Repository forked | Source → target fork |
|
||||
| `pull_request_review` | PR review submitted | Review state (approved/changes/commented), body |
|
||||
| `pull_request_review_comment` | Inline code review comment | File path, line number, comment body |
|
||||
| `commit_comment` | Comment on a commit | Commit SHA, comment body |
|
||||
| `member` | Collaborator added/removed | Member login, action |
|
||||
| `label` | Label created/edited/deleted | Label name, color, description |
|
||||
| `milestone` | Milestone opened/closed | Progress bar, issue counts, due date |
|
||||
| `discussion` | Discussion created/answered | Title, category, action |
|
||||
| `discussion_comment` | Comment on discussion | Comment body, discussion reference |
|
||||
| `repository` | Repo renamed/transferred | Old → new name, changes |
|
||||
| `code_scanning_alert` | Code scanning alert | Severity, rule ID, file path |
|
||||
| `dependabot_alert` | Dependabot alert | Severity, package, vulnerable range, fix version |
|
||||
| Event | Description | Embed Highlights |
|
||||
|-------------------------------|--------------------------------|------------------------------------------------------------------------------------------------------------------------|
|
||||
| `push` | Code pushed to a branch | Commit list, branch, author, diff stats |
|
||||
| `pull_request` | PR opened/closed/merged/edited | PR title, branch, diff stats, labels |
|
||||
| `issues` | Issue opened/closed/edited | Issue title, labels, assignees |
|
||||
| `issue_comment` | Comment on issue or PR | Comment body, issue reference |
|
||||
| `workflow_run` | CI/CD workflow phase updated | Workflow status, conclusion, duration; phases update a single message in place |
|
||||
| `workflow_job` | CI job phase updated | Job name, status, conclusion, workflow |
|
||||
| `status` | Commit status updated | Commit status, context, state, commit link |
|
||||
| `deployment` | Deployment created | Environment, ref, task |
|
||||
| `deployment_status` | Deployment status updated | Environment, status, commit ref |
|
||||
| `check_run` | Check run phase updated | Status, conclusion, details URL; phases update a single message in place |
|
||||
| `check_suite` | Check suite completed | Suite conclusion, head branch, commit link |
|
||||
| `ping` | Webhook confirmation | Webhook confirmation, event types subscribed |
|
||||
| `release` | Release published/edited | Tag, body, assets, pre-release flag |
|
||||
| `create` | Branch or tag created | Ref name, ref type |
|
||||
| `delete` | Branch or tag deleted | Ref name, ref type |
|
||||
| `star` | Repository starred/unstarred | Star count, action |
|
||||
| `fork` | Repository forked | Source → target fork |
|
||||
| `pull_request_review` | PR review submitted | Review state (approved/changes/commented), body |
|
||||
| `pull_request_review_comment` | Inline code review comment | File path, line number, comment body |
|
||||
| `commit_comment` | Comment on a commit | Commit SHA, comment body |
|
||||
| `member` | Collaborator added/removed | Member login, action |
|
||||
| `label` | Label created/edited/deleted | Label name, color, description |
|
||||
| `milestone` | Milestone opened/closed | Progress bar, issue counts, due date |
|
||||
| `discussion` | Discussion created/answered | Title, category, action |
|
||||
| `discussion_comment` | Comment on discussion | Comment body, discussion reference |
|
||||
| `repository` | Repo renamed/transferred | Old → new name, changes |
|
||||
| `code_scanning_alert` | Code scanning alert | Severity, rule ID, file path |
|
||||
| `dependabot_alert` | Dependabot alert | Severity, package, vulnerable range, fix version |
|
||||
| `custom` | Signed custom JSON webhook | Arbitrary title/description/color/url/author/fields (see [Custom webhooks](../guide/configuration.md#custom-webhooks)) |
|
||||
|
||||
## Color Coding
|
||||
|
||||
Each event type uses a distinct color in the Discord embed (from `src/formatters/colors.ts`):
|
||||
Each event type uses a distinct color in the Discord embed (from `server/lib/formatters/colors.ts`):
|
||||
|
||||
| Color | Events |
|
||||
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Green (`#2da44e`) | push, PR opened / ready for review, issue opened, workflow success, release published, check success, review approved, deployment success, member added, milestone closed, discussion answered |
|
||||
| Red (`#f85149`) | PR closed, issue closed, workflow failure, release deleted, delete, check failure, review changes requested, deployment failure, member removed, code scanning / dependabot critical & high |
|
||||
| Purple (`#8957e5`) | PR merged, label, discussion |
|
||||
|
|
@ -53,11 +54,9 @@ Each event type uses a distinct color in the Discord embed (from `src/formatters
|
|||
|
||||
Any event type without a dedicated formatter falls through to the generic formatter, which produces a basic embed with:
|
||||
|
||||
- Event type as title
|
||||
- Action (if available)
|
||||
- Actor login
|
||||
- Repository name
|
||||
- Raw payload as code block (truncated to 1000 chars)
|
||||
- Event type as title (plus the action when available)
|
||||
- Actor login (author line)
|
||||
- Repository name in the footer
|
||||
|
||||
## In-Place Message Updates
|
||||
|
||||
|
|
@ -68,7 +67,7 @@ Any event type without a dedicated formatter falls through to the generic format
|
|||
See the [Filter Tutorial](../guide/filters) for a hands-on guide with worked examples.
|
||||
|
||||
| Filter | Works With |
|
||||
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `event` | All events |
|
||||
| `repo` | All events |
|
||||
| `actor` | All events |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue