AS AgentScopeAPI 手册 / API Reference

GitHubWebhookController

@RestController @RequestMapping("/api/channels/github") public class GitHubWebhookController
源码Source io/agentscope/extensions/channel/github/GitHubWebhookController.java:44–154

GitHub 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
channelIdString渠道标识(类型 `String`)。The channel id.
eventTypeString事件类型(类型 `String`)。The event type.
deliveryIdStringdelivery 标识(类型 `String`)。The delivery id.
signature256Stringsignature 256(类型 `String`)。The signature 256.
rawBodybyte[]原始正文(类型 `byte[]`)。The raw body.
返回Returns Mono<ResponseEntity<String>>
返回Mono>。Returns mono.
源码Source io/agentscope/extensions/channel/github/GitHubWebhookController.java:62–153
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.