GitHubWebhookController
@RestController @RequestMapping("/api/channels/github") public class GitHubWebhookController
源码Source
io/agentscope/extensions/channel/github/GitHubWebhookController.java:44–154GitHub Webhook 控制器,把智能体接入外部消息渠道与企业平台。位于 io.agentscope.extensions.channel.github 包。核心成员包括 webhook、GitHubWebhookController。
Handles GitHub webhook deliveries. Single endpoint at
POST /api/channels/github/{channelId}/webhook. The body is JSON (received as a raw
byte[] so the HMAC-SHA256 signature can be computed over the exact bytes GitHub signed).
Pipeline: signature verify -> event-type dispatch -> idempotency dedup -> bot-loop guard -> dispatch on the channel.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public GitHubWebhookController() | 初始化 `GitHubWebhookController` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Mono<ResponseEntity<String>> webhook(String channelId, String eventType, String deliveryId, String signature256, byte[] rawBody) | 执行 `webhook` 方法。 Performs the webhook operation. |
构造器详情Constructor Detail
GitHubWebhookController
public GitHubWebhookController()
初始化 GitHubWebhookController 实例。
Creates a new instance.
源码Source
io/agentscope/extensions/channel/github/GitHubWebhookController.java:53–55方法详情Method Detail
webhook
public Mono<ResponseEntity<String>> webhook(String channelId, String eventType, String deliveryId, String signature256, byte[] rawBody)
执行 webhook 方法。
Performs the webhook operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
eventType | String | 事件类型(类型 `String`)。The event type. |
deliveryId | String | delivery 标识(类型 `String`)。The delivery id. |
signature256 | String | signature 256(类型 `String`)。The signature 256. |
rawBody | byte[] | 原始正文(类型 `byte[]`)。The raw body. |
Mono<ResponseEntity<String>>返回Mono>。Returns mono.
源码Source
io/agentscope/extensions/channel/github/GitHubWebhookController.java:62–153