mcpField
C
create-github-pull-request-from-specification

create-github-pull-request-from-specification

github.com/github开发40.5k8.9k 次安装1 天前更新
代码仓库

关于 create-github-pull-request-from-specification

根据工作区中的 Pull Request 模板创建 GitHub Pull Request 的技能。它会检查当前分支是否已有请求,将规格信息写入标题和正文,再将请求设为可审查并分配给创建者。

主要功能

  1. 01从 Pull Request 模板提取要求
  2. 02检查是否已有 Pull Request
  3. 03创建或更新 Pull Request
  4. 04将请求设为可审查
  5. 05分配给 Pull Request 创建者

适用场景

  1. 01为规格说明创建 Pull Request
  2. 02避免当前分支产生重复请求
  3. 03依据模板填写请求正文
  4. 04将草稿请求准备为待审查状态

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/github/awesome-copilot --skill create-github-pull-request-from-specification

安装后在 Claude Code 中输入/create-github-pull-request-from-specification确认已加载。

详细介绍

根据规范创建 GitHub Pull Request

为 ${workspaceFolder}/.github/pull_request_template.md 处的规范创建 GitHub Pull Request。

流程

  1. 通过 'search' 工具分析来自 '${workspaceFolder}/.github/pull_request_template.md' 的规范文件模板,以提取需求。
  2. 使用 'create_pull_request' 工具针对 ${input:targetBranch} 创建 pull request 草稿模板。并确保当前分支不存在任何 pull request get_pull_request。如果存在,继续执行步骤 4,并跳过步骤 3。
  3. 通过使用 'get_pull_request_diff' 工具获取 pull request 中的变更,以分析 pull Request 中已更改的信息。
  4. 使用 'update_pull_request' 工具更新上一步创建的 pull request 正文和标题。结合第一步中获取的模板信息,按需更新正文和标题。
  5. 通过使用 'update_pull_request' 工具从草稿切换为可供审查。以更新 pull request 的状态。
  6. 使用 'get_me' 获取创建 pull request 的人员的用户名,并分配给 update_issue 工具。以分配 pull request。
  7. 向用户响应已创建的 Pull request URL。

要求

  • 为完整规范创建单个 pull request
  • 清晰的标题/pull_request_template.md 标识该规范
  • 向 pull_request_template.md 中填入足够的信息
  • 创建前对照现有 pull request 进行核实

评论

支持 Markdown