AS AgentScopeAPI 手册 / API Reference

GitHubChannelProperties

public record GitHubChannelProperties( String token, String webhookSecret, String apiBase, String webhookPath, String botUserLogin)
源码Source io/agentscope/extensions/channel/github/GitHubChannelProperties.java:37–78

承载 GitHub 渠道属性数据的记录类型。位于 io.agentscope.extensions.channel.github 包。核心成员包括 token、webhookSecret、apiBase、webhookPath、botUserLogin、from。

Provider-specific configuration for a single GitHub channel instance, sourced from the properties block of channels.<id> in agentscope.json.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
tokenString
执行令牌相关操作。
Personal Access Token (PAT, fine-grained or classic) used for the REST API outbound and bot-identity lookup. Required.
webhookSecretString
执行 `webhookSecret` 方法。
shared secret configured on the webhook; used to verify `X-Hub-Signature-256`. Required.
apiBaseString
执行API 基类相关操作。
override for the GitHub REST API base; defaults to `https://api.github.com` (set to `https://github.your-corp.com/api/v3` for GitHub Enterprise Server)
webhookPathString
执行 `webhookPath` 方法。
HTTP path Spring exposes the webhook under; defaults to `/api/channels/github/{channelId}/webhook`
botUserLoginString
执行 `botUserLogin` 方法。
optional override for the bot account's login (e.g. `my-bot`). When unset, the channel resolves the login automatically via `GET /user` at startup.

构造器摘要Constructor Summary

构造器Constructor说明Description
public GitHubChannelProperties(String token, String webhookSecret, String apiBase, String webhookPath, String botUserLogin)
初始化 `GitHubChannelProperties` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public static GitHubChannelProperties from(String channelId, Map<String, Object> props)
static
创建并返回实例。
Reads a `GitHubChannelProperties` from an arbitrary properties map.

记录组件详情Record Component Detail

token

String token

执行令牌相关操作。

Personal Access Token (PAT, fine-grained or classic) used for the REST API outbound and bot-identity lookup. Required.

源码Source io/agentscope/extensions/channel/github/GitHubChannelProperties.java:37–78

webhookSecret

String webhookSecret

执行 webhookSecret 方法。

shared secret configured on the webhook; used to verify X-Hub-Signature-256. Required.

源码Source io/agentscope/extensions/channel/github/GitHubChannelProperties.java:37–78

apiBase

String apiBase

执行API 基类相关操作。

override for the GitHub REST API base; defaults to https://api.github.com (set to https://github.your-corp.com/api/v3 for GitHub Enterprise Server)

源码Source io/agentscope/extensions/channel/github/GitHubChannelProperties.java:37–78

webhookPath

String webhookPath

执行 webhookPath 方法。

HTTP path Spring exposes the webhook under; defaults to /api/channels/github/{channelId}/webhook

源码Source io/agentscope/extensions/channel/github/GitHubChannelProperties.java:37–78

botUserLogin

String botUserLogin

执行 botUserLogin 方法。

optional override for the bot account's login (e.g. my-bot). When unset, the channel resolves the login automatically via GET /user at startup.

源码Source io/agentscope/extensions/channel/github/GitHubChannelProperties.java:37–78

构造器详情Constructor Detail

GitHubChannelProperties

public GitHubChannelProperties(String token, String webhookSecret, String apiBase, String webhookPath, String botUserLogin)

初始化 GitHubChannelProperties 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
tokenString令牌(类型 `String`)。The token.
webhookSecretStringwebhook 密钥(类型 `String`)。The webhook secret.
apiBaseStringAPI 基类(类型 `String`)。The api base.
webhookPathStringwebhook 路径(类型 `String`)。The webhook path.
botUserLoginStringbot 用户 Login(类型 `String`)。The bot user login.
源码Source io/agentscope/extensions/channel/github/GitHubChannelProperties.java:44–54

方法详情Method Detail

from

public static GitHubChannelProperties from(String channelId, Map<String, Object> props)
static

创建并返回实例。

Reads a GitHubChannelProperties from an arbitrary properties map.

参数Parameters
名称Name类型Type说明Description
channelIdString渠道标识(类型 `String`)。The channel id.
propsMap<String, Object>props(类型 `Map`)。The props.
返回Returns GitHubChannelProperties
返回GitHubChannelProperties。Returns github channel properties.
源码Source io/agentscope/extensions/channel/github/GitHubChannelProperties.java:57–67
基于官方固定版本源码静态生成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.