AS AgentScopeAPI 手册 / API Reference

GitHubWebhookHandler

@RestController public class GitHubWebhookHandler
源码Source io/agentscope/harness/coding/webhook/github/GitHubWebhookHandler.java:51–343

GitHub Webhook 处理器,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.coding.webhook.github 包。核心成员包括 handleGitHubEvent、health、GitHubWebhookHandler。

Spring WebFlux handler for GitHub webhooks.

  • HMAC SHA-256 signature verification (X-Hub-Signature-256)

  • Delivery dedup (X-GitHub-Delivery)

  • Event routing: issue comment, PR comment, review_requested, push (watch)

  • Thread ID generation via ThreadIdFactory

  • Dispatch to coding or reviewer agent via RunDispatcher

构造器摘要Constructor Summary

构造器Constructor说明Description
public GitHubWebhookHandler(RunDispatcher dispatcher, SqliteBaseStore store)
初始化 `GitHubWebhookHandler` 实例。
Creates a new instance.
public GitHubWebhookHandler(RunDispatcher dispatcher, SqliteBaseStore store, CodingAgentMetrics metrics)
初始化 `GitHubWebhookHandler` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Mono<ResponseEntity<String>> handleGitHubEvent(String signature, String event, String deliveryId, byte[] rawBody)
处理GitHub 事件。
Performs the handle github event operation.
public Mono<ResponseEntity<String>> health()
返回健康状态。
Returns the health.

构造器详情Constructor Detail

GitHubWebhookHandler

public GitHubWebhookHandler(RunDispatcher dispatcher, SqliteBaseStore store)

初始化 GitHubWebhookHandler 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
dispatcherRunDispatcher调度器(类型 `RunDispatcher`)。The dispatcher.
storeSqliteBaseStore存储实例(类型 `SqliteBaseStore`)。The store.
源码Source io/agentscope/harness/coding/webhook/github/GitHubWebhookHandler.java:65–67

GitHubWebhookHandler

public GitHubWebhookHandler(RunDispatcher dispatcher, SqliteBaseStore store, CodingAgentMetrics metrics)

初始化 GitHubWebhookHandler 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
dispatcherRunDispatcher调度器(类型 `RunDispatcher`)。The dispatcher.
storeSqliteBaseStore存储实例(类型 `SqliteBaseStore`)。The store.
metricsCodingAgentMetrics指标(类型 `CodingAgentMetrics`)。The metrics.
源码Source io/agentscope/harness/coding/webhook/github/GitHubWebhookHandler.java:69–74

方法详情Method Detail

handleGitHubEvent

public Mono<ResponseEntity<String>> handleGitHubEvent(String signature, String event, String deliveryId, byte[] rawBody)

处理GitHub 事件。

Performs the handle github event operation.

参数Parameters
名称Name类型Type说明Description
signatureStringsignature(类型 `String`)。The signature.
eventString事件(类型 `String`)。The event.
deliveryIdStringdelivery 标识(类型 `String`)。The delivery id.
rawBodybyte[]原始正文(类型 `byte[]`)。The raw body.
返回Returns Mono<ResponseEntity<String>>
返回Mono>。Returns mono.
源码Source io/agentscope/harness/coding/webhook/github/GitHubWebhookHandler.java:76–131

health

public Mono<ResponseEntity<String>> health()

返回健康状态。

Returns the health.

返回Returns Mono<ResponseEntity<String>>
返回Mono>。Returns mono.
源码Source io/agentscope/harness/coding/webhook/github/GitHubWebhookHandler.java:133–136
基于官方固定版本源码静态生成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.