GitHubChannelProperties
public record GitHubChannelProperties( String token, String webhookSecret, String apiBase, String webhookPath, String botUserLogin)
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 |
|---|---|---|
token | String | 执行令牌相关操作。 Personal Access Token (PAT, fine-grained or classic) used for the REST API outbound
and bot-identity lookup. Required. |
webhookSecret | String | 执行 `webhookSecret` 方法。 shared secret configured on the webhook; used to verify
`X-Hub-Signature-256`. Required. |
apiBase | String | 执行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) |
webhookPath | String | 执行 `webhookPath` 方法。 HTTP path Spring exposes the webhook under; defaults to
`/api/channels/github/{channelId}/webhook` |
botUserLogin | String | 执行 `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.
io/agentscope/extensions/channel/github/GitHubChannelProperties.java:37–78webhookSecret
String webhookSecret执行 webhookSecret 方法。
shared secret configured on the webhook; used to verify
X-Hub-Signature-256. Required.
io/agentscope/extensions/channel/github/GitHubChannelProperties.java:37–78apiBase
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)
io/agentscope/extensions/channel/github/GitHubChannelProperties.java:37–78webhookPath
String webhookPath执行 webhookPath 方法。
HTTP path Spring exposes the webhook under; defaults to
/api/channels/github/{channelId}/webhook
io/agentscope/extensions/channel/github/GitHubChannelProperties.java:37–78botUserLogin
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.
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.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
token | String | 令牌(类型 `String`)。The token. |
webhookSecret | String | webhook 密钥(类型 `String`)。The webhook secret. |
apiBase | String | API 基类(类型 `String`)。The api base. |
webhookPath | String | webhook 路径(类型 `String`)。The webhook path. |
botUserLogin | String | bot 用户 Login(类型 `String`)。The bot user login. |
io/agentscope/extensions/channel/github/GitHubChannelProperties.java:44–54方法详情Method Detail
from
public static GitHubChannelProperties from(String channelId, Map<String, Object> props)
创建并返回实例。
Reads a GitHubChannelProperties from an arbitrary properties map.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
props | Map<String, Object> | props(类型 `Map`)。The props. |
GitHubChannelPropertiesio/agentscope/extensions/channel/github/GitHubChannelProperties.java:57–67