为特定日期或日期范围生成 GitHub 拉取请求(PR)摘要。当用户想要了解项目进展、创建每日总结或查看上游更改时使用。例如:"summary PRs from the cli remote" 或 "summary pr from cli"。
此技能帮助您获取并总结 GitHub 仓库在特定日期或日期范围内的拉取请求(PR)。 例子:
按照以下步骤生成 PR 摘要:
确定日期范围:
YYYY-MM-DD。获取 PR:
git 和 gh。gh) 获取在指定时间内创建和关闭的 PR。bash gh pr list --repo $(git remote get-url <remote_name> | sed -E 's/.*github.com[:\/]//; s/\.git$//') --state all --search "created:<YYYY-MM-DD>" --json number,title,state,createdAt,author bash gh pr list --repo $(git remote get-url <remote_name> | sed -E 's/.*github.com[:\/]//; s/\.git$//') --state all --search "closed:<YYYY-MM-DD>" --json number,title,state,closedAt,author 处理与总结:
高层总结:提供当天整体活动的高层总结(PR 总数、主要关注点)。
完整清单列表:使用 Markdown 表格列出所有 PR。
包含超链接:表格中的标题必须是直接指向 PR 的链接,格式为 [标题](https://github.com/<owner>/<repo>/pull/<number>)。
状态区分 (Emoji):在状态列使用以下 Emoji 区分:
示例格式:
| 编号 | OPEN PRs | 作者 | 状态 |
|---|---|---|---|
| #123 | [feat: add new feature] (https://github.com/owner/repo/pull/123) | user | 🔵 OPEN |
| 编号 | MERGED/CLOSED PRs | 作者 | 状态 |
|---|---|---|---|
| #123 | [feat: add new feature] (https://github.com/owner/repo/pull/123) | user | 🟣 MERGED |
| #123 | [feat: add new feature] (https://github.com/owner/repo/pull/123) | user | 🟣 CLOSED |
gh 输出中的确切标题和编号。git 和 gh。git remotecheck. 不要拆分命令进行执行,bash支持命令替换.