get-pr-context
Installation
SKILL.md
Get PR Context
获取当前仓库指定 Pull Request 的完整上下文信息。
使用方法
当需要获取 PR 上下文时,执行以下命令:
# 获取 PR 基本信息
gh api repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}
# 获取 PR Diff
gh api repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER} -H "Accept: application/vnd.github.v3.diff"
# 获取 Issue 评论(普通评论)
gh api repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments