AS AgentScopeAPI 手册 / API Reference

GitHubReviewPublisher

public class GitHubReviewPublisher
源码Source io/agentscope/harness/coding/reviewer/GitHubReviewPublisher.java:37–178

GitHub Review Publisher,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.coding.reviewer 包。核心成员包括 publish、GitHubReviewPublisher。

Publishes reviewer findings to a GitHub PR as inline comments.

Creates a single GitHub pull request review with inline comment for each finding. Resolves existing GitHub review threads for findings that transition to resolved.

构造器摘要Constructor Summary

构造器Constructor说明Description
public GitHubReviewPublisher()
初始化 `GitHubReviewPublisher` 实例。
Creates a new instance.
public GitHubReviewPublisher(CodingAgentMetrics metrics)
初始化 `GitHubReviewPublisher` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public void publish(String threadId, String prUrl, String token, ReviewerFindingsService findingsService) throws IOException, InterruptedException
执行发布相关操作。
Publishes accumulated findings for `threadId` as a single GitHub PR review.

构造器详情Constructor Detail

GitHubReviewPublisher

public GitHubReviewPublisher()

初始化 GitHubReviewPublisher 实例。

Creates a new instance.

源码Source io/agentscope/harness/coding/reviewer/GitHubReviewPublisher.java:48–50

GitHubReviewPublisher

public GitHubReviewPublisher(CodingAgentMetrics metrics)

初始化 GitHubReviewPublisher 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
metricsCodingAgentMetrics指标(类型 `CodingAgentMetrics`)。The metrics.
源码Source io/agentscope/harness/coding/reviewer/GitHubReviewPublisher.java:52–56

方法详情Method Detail

publish

public void publish(String threadId, String prUrl, String token, ReviewerFindingsService findingsService) throws IOException, InterruptedException

执行发布相关操作。

Publishes accumulated findings for threadId as a single GitHub PR review.

参数Parameters
名称Name类型Type说明Description
threadIdString会话线程标识(类型 `String`)。session thread ID
prUrlStringpr URL(类型 `String`)。full PR URL
tokenString令牌(类型 `String`)。GitHub token
findingsServiceReviewerFindingsServicefindings 服务(类型 `ReviewerFindingsService`)。finding source
抛出Throws
  • IOException 可能抛出 `IOException`。Thrown when the operation cannot be completed.
  • InterruptedException 可能抛出 `InterruptedException`。Thrown when the operation cannot be completed.
源码Source io/agentscope/harness/coding/reviewer/GitHubReviewPublisher.java:66–151
基于官方固定版本源码静态生成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.