新增了完整的GitHub集成插件,包含认证、会话管理、Webhook处理、消息收发、反应支持等核心功能,支持Issues、Discussions、Pull Request的交互与通知。
269 lines
7.6 KiB
JSON
269 lines
7.6 KiB
JSON
{
|
||
"id": "github",
|
||
"name": "GitHub",
|
||
"version": "1.0.0",
|
||
"description": "GitHub 渠道插件,支持 Issues、Discussions、Pull Requests 的交互和通知管理。",
|
||
"author": "Yuxi Team",
|
||
"license": "MIT",
|
||
"order": 60,
|
||
"entry_point": "yuxi.channel.extensions.github",
|
||
"capabilities": {
|
||
"chat_types": ["direct", "group"],
|
||
"message_types": ["text", "markdown"],
|
||
"interactions": [],
|
||
"reactions": true,
|
||
"typing_indicator": false,
|
||
"threads": false,
|
||
"edit": true,
|
||
"unsend": true,
|
||
"reply": true,
|
||
"media": false,
|
||
"native_commands": false,
|
||
"polls": false,
|
||
"group_management": false,
|
||
"streaming": true,
|
||
"streaming_mode": "block",
|
||
"block_streaming": true,
|
||
"block_streaming_chunk_min_chars": 4000,
|
||
"block_streaming_chunk_max_chars": 65000,
|
||
"block_streaming_chunk_break_preference": "paragraph",
|
||
"block_streaming_coalesce_min_chars": 2000,
|
||
"block_streaming_coalesce_max_chars": 65000,
|
||
"adaptive_cards": false
|
||
},
|
||
"config_schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"token": {
|
||
"type": "string",
|
||
"title": "GitHub Personal Access Token",
|
||
"description": "GitHub Personal Access Token (classic 或 fine-grained)",
|
||
"format": "password"
|
||
},
|
||
"app_id": {
|
||
"type": "string",
|
||
"title": "GitHub App ID",
|
||
"description": "GitHub App 的 App ID(如使用 GitHub App 认证)"
|
||
},
|
||
"private_key": {
|
||
"type": "string",
|
||
"title": "GitHub App Private Key",
|
||
"description": "GitHub App 的私钥 PEM 内容(如使用 GitHub App 认证)",
|
||
"format": "textarea"
|
||
},
|
||
"installation_id": {
|
||
"type": "string",
|
||
"title": "GitHub App Installation ID",
|
||
"description": "GitHub App 安装 ID(如使用 GitHub App 认证)"
|
||
},
|
||
"webhook_secret": {
|
||
"type": "string",
|
||
"title": "Webhook Secret",
|
||
"description": "GitHub webhook 签名验证密钥",
|
||
"format": "password"
|
||
},
|
||
"api_base_url": {
|
||
"type": "string",
|
||
"title": "API Base URL",
|
||
"description": "GitHub API 基础地址(GitHub Enterprise 需要修改)",
|
||
"default": "https://api.github.com",
|
||
"format": "uri"
|
||
},
|
||
"graphql_endpoint": {
|
||
"type": "string",
|
||
"title": "GraphQL Endpoint",
|
||
"description": "GitHub GraphQL API 地址",
|
||
"default": "https://api.github.com/graphql",
|
||
"format": "uri"
|
||
},
|
||
"default_owner": {
|
||
"type": "string",
|
||
"title": "Default Owner",
|
||
"description": "默认的仓库所有者(用户或组织名)"
|
||
},
|
||
"default_repo": {
|
||
"type": "string",
|
||
"title": "Default Repository",
|
||
"description": "默认操作的仓库名称"
|
||
},
|
||
"allowed_repos": {
|
||
"type": "array",
|
||
"title": "Allowed Repositories",
|
||
"description": "允许访问的仓库列表(格式:owner/repo)",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"allowed_events": {
|
||
"type": "array",
|
||
"title": "Allowed Webhook Events",
|
||
"description": "允许处理的 webhook 事件类型",
|
||
"items": {
|
||
"type": "string",
|
||
"enum": [
|
||
"issues",
|
||
"issue_comment",
|
||
"pull_request",
|
||
"pull_request_review",
|
||
"pull_request_review_comment",
|
||
"discussion",
|
||
"discussion_comment",
|
||
"push",
|
||
"release",
|
||
"star",
|
||
"watch",
|
||
"fork",
|
||
"create",
|
||
"delete",
|
||
"workflow_run",
|
||
"workflow_job",
|
||
"check_run",
|
||
"check_suite",
|
||
"commit_comment",
|
||
"label",
|
||
"milestone",
|
||
"project",
|
||
"project_card",
|
||
"project_column",
|
||
"repository",
|
||
"repository_dispatch",
|
||
"security_advisory",
|
||
"dependabot_alert",
|
||
"code_scanning_alert",
|
||
"secret_scanning_alert",
|
||
"member",
|
||
"membership",
|
||
"team",
|
||
"team_add",
|
||
"organization",
|
||
"ping"
|
||
]
|
||
},
|
||
"default": [
|
||
"issues",
|
||
"issue_comment",
|
||
"pull_request",
|
||
"discussion",
|
||
"discussion_comment"
|
||
]
|
||
},
|
||
"auto_reply_enabled": {
|
||
"type": "boolean",
|
||
"title": "Auto Reply Enabled",
|
||
"description": "是否启用自动回复新 Issues/PRs",
|
||
"default": true
|
||
},
|
||
"auto_reply_template": {
|
||
"type": "string",
|
||
"title": "Auto Reply Template",
|
||
"description": "自动回复模板内容",
|
||
"format": "textarea",
|
||
"default": "Thanks for opening this! Our team will review it shortly."
|
||
},
|
||
"label_mapping": {
|
||
"type": "object",
|
||
"title": "Label Mapping",
|
||
"description": "标签映射规则",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"dm_policy": {
|
||
"type": "string",
|
||
"title": "DM Policy",
|
||
"description": "私信访问控制策略",
|
||
"enum": ["open", "pairing", "closed"],
|
||
"default": "open"
|
||
},
|
||
"group_policy": {
|
||
"type": "string",
|
||
"title": "Group Policy",
|
||
"description": "群组访问控制策略",
|
||
"enum": ["open", "allowlist", "closed"],
|
||
"default": "open"
|
||
},
|
||
"max_comment_length": {
|
||
"type": "integer",
|
||
"title": "Max Comment Length",
|
||
"description": "评论最大字符数",
|
||
"default": 65535,
|
||
"minimum": 100,
|
||
"maximum": 65535
|
||
},
|
||
"rate_limit_per_minute": {
|
||
"type": "integer",
|
||
"title": "Rate Limit Per Minute",
|
||
"description": "每分钟最大请求数",
|
||
"default": 100,
|
||
"minimum": 10,
|
||
"maximum": 5000
|
||
},
|
||
"enable_graphql": {
|
||
"type": "boolean",
|
||
"title": "Enable GraphQL",
|
||
"description": "是否启用 GitHub GraphQL API 用于 Discussions",
|
||
"default": true
|
||
}
|
||
},
|
||
"required": []
|
||
},
|
||
"webhook": {
|
||
"enabled": true,
|
||
"path": "/webhooks/github",
|
||
"methods": ["POST"],
|
||
"auth_type": "hmac",
|
||
"secret_header": "X-Hub-Signature-256"
|
||
},
|
||
"dependencies": [],
|
||
"min_api_version": "1.0.0",
|
||
"documentation_url": "https://docs.github.com/en/rest",
|
||
"icon": "github",
|
||
"color": "#24292f",
|
||
"tags": ["github", "git", "developer", "enterprise"],
|
||
"features": {
|
||
"rich_text": true,
|
||
"markdown_support": true,
|
||
"html_support": true,
|
||
"emoji_support": true,
|
||
"file_sharing": true,
|
||
"voice_messages": false,
|
||
"video_messages": false,
|
||
"location_sharing": false,
|
||
"contact_cards": false,
|
||
"message_search": true,
|
||
"threaded_replies": true,
|
||
"message_editing": true,
|
||
"message_deletion": false,
|
||
"typing_indicators": false,
|
||
"read_receipts": false,
|
||
"delivery_receipts": true,
|
||
"bot_commands": true,
|
||
"slash_commands": true,
|
||
"interactive_cards": false,
|
||
"buttons": true,
|
||
"quick_replies": false,
|
||
"menus": false,
|
||
"forms": false,
|
||
"polls": false,
|
||
"scheduling": false,
|
||
"reminders": false,
|
||
"notifications": true,
|
||
"mentions": true,
|
||
"hashtags": false,
|
||
"custom_status": false,
|
||
"presence_indicators": false,
|
||
"user_profiles": true,
|
||
"group_profiles": true,
|
||
"channel_directory": false,
|
||
"guest_access": true,
|
||
"single_sign_on": true,
|
||
"two_factor_auth": true,
|
||
"end_to_end_encryption": false,
|
||
"data_residency": true,
|
||
"gdpr_compliant": true,
|
||
"hipaa_compliant": false,
|
||
"soc2_compliant": true,
|
||
"iso27001_compliant": true
|
||
}
|
||
}
|