{"skill":{"slug":"github-workflow","displayName":"Github Workflow","summary":"GitHub 集成。管理仓库、Issue、Pull Request 和 GitHub Actions 工作流。通过 MorphixAI 代理安全访问 GitHub API。","description":"---\nname: github-workflow\ndescription: GitHub 集成。管理仓库、Issue、Pull Request 和 GitHub Actions 工作流。通过 MorphixAI 代理安全访问 GitHub API。\nmetadata:\n  openclaw:\n    emoji: \"🐙\"\n    requires:\n      env: [MORPHIXAI_API_KEY]\n---\n\n# GitHub 集成\n\n通过 `mx_github` 工具管理 GitHub 仓库、Issue、PR 和 CI/CD 工作流。\n\n## 前置条件\n\n1. **安装插件**: `openclaw plugins install openclaw-morphixai`\n2. **获取 API Key**: 访问 [morphix.app/api-keys](https://morphix.app/api-keys) 生成 `mk_xxxxxx` 密钥\n3. **配置环境变量**: `export MORPHIXAI_API_KEY=\"mk_your_key_here\"`\n4. **链接账号**: 访问 [morphix.app/connections](https://morphix.app/connections) 链接 GitHub 账号，或通过 `mx_link` 工具链接（app: `github`）\n\n## 核心操作\n\n### 查看当前用户\n\n```\nmx_github:\n  action: get_user\n```\n\n### 列出仓库\n\n```\nmx_github:\n  action: list_repos\n  sort: \"updated\"\n  per_page: 10\n```\n\n### 查看仓库详情\n\n```\nmx_github:\n  action: get_repo\n  repo: \"owner/repo-name\"\n```\n\n### Issue 操作\n\n**列出 Issue（不含 PR）：**\n```\nmx_github:\n  action: list_issues\n  repo: \"owner/repo\"\n  state: \"open\"\n  per_page: 10\n```\n\n**创建 Issue：**\n```\nmx_github:\n  action: create_issue\n  repo: \"owner/repo\"\n  title: \"Bug: 登录页面加载异常\"\n  body: \"## 问题描述\\n登录页面在 Safari 中无法正常加载\\n\\n## 复现步骤\\n1. 打开 Safari\\n2. 访问登录页\"\n  labels: [\"bug\", \"frontend\"]\n  assignees: [\"username\"]\n```\n\n**更新 Issue：**\n```\nmx_github:\n  action: update_issue\n  repo: \"owner/repo\"\n  issue_number: 42\n  state: \"closed\"\n```\n\n### Pull Request 操作\n\n**列出 PR：**\n```\nmx_github:\n  action: list_pulls\n  repo: \"owner/repo\"\n  state: \"open\"\n```\n\n**创建 PR：**\n```\nmx_github:\n  action: create_pull\n  repo: \"owner/repo\"\n  title: \"feat: 添加用户登录功能\"\n  head: \"feature/user-login\"\n  base: \"main\"\n  body: \"## 改动内容\\n- 实现了 JWT 登录\\n- 添加了单元测试\"\n```\n\n### GitHub Actions\n\n**查看工作流运行：**\n```\nmx_github:\n  action: list_workflow_runs\n  repo: \"owner/repo\"\n  per_page: 5\n```\n\n**触发工作流：**\n```\nmx_github:\n  action: trigger_workflow\n  repo: \"owner/repo\"\n  workflow_id: \"deploy.yml\"\n  ref: \"main\"\n  inputs: { \"environment\": \"staging\" }\n```\n\n## 常见工作流\n\n### 创建 Feature PR\n\n```\n1. mx_github: create_pull\n     repo: \"owner/repo\", title: \"feat: xxx\", head: \"feature/xxx\", base: \"main\"\n2. mx_github: list_workflow_runs  → 检查 CI 状态\n```\n\n### 查看项目 Issue 和 PR 概况\n\n```\n1. mx_github: list_issues, repo: \"owner/repo\", state: \"open\"\n2. mx_github: list_pulls, repo: \"owner/repo\", state: \"open\"\n```\n\n## 注意事项\n\n- `repo` 参数格式为 `\"owner/repo\"`（如 `\"paul-leo/mini-tanka\"`）\n- `list_issues` 自动过滤掉 PR（GitHub API 的 /issues 端点会返回 PR）\n- `trigger_workflow` 需要仓库有对应的 workflow 文件和 `workflow_dispatch` 触发器\n- `account_id` 参数通常省略，工具自动检测已链接的 GitHub 账号\n","tags":{"latest":"0.1.1"},"stats":{"comments":0,"downloads":3285,"installsAllTime":20,"installsCurrent":20,"stars":1,"versions":2},"createdAt":1772619005630,"updatedAt":1778491714733},"latestVersion":{"version":"0.1.1","createdAt":1772786547563,"changelog":"- 新增前置条件说明，包括插件安装、API Key 获取和配置、以及 GitHub 账号链接的详细步骤\n- 前置条件部分现在提供了具体链接和命令，提升集成指引清晰度\n- 其余说明与操作示例保持不变","license":null},"metadata":{"setup":[{"key":"MORPHIXAI_API_KEY","required":true}],"os":null,"systems":null},"owner":{"handle":"paul-leo","userId":"s1752kcbgt0ajgbfqwd4y5vb3n83kvp4","displayName":"Paul Leo","image":"https://avatars.githubusercontent.com/u/55380315?v=4"},"moderation":null}