File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # .cursor/rules/gh-pr-comments.mdc
2+ ---
3+ alwaysApply: false
4+ ---
5+ # GitHub CLI - Pull Request Comments & Review Context
6+
7+ This project uses GitHub CLI to fetch and analyze pull request review comments with detailed context.
8+
9+ ## Getting Review Comments with Line Numbers & Resolution Status
10+
11+ ### Primary Command (GraphQL - Full Featured)
12+
13+ Use GraphQL API to get complete comment context including resolution status and line numbers:
14+
15+ ```bash
16+ gh api graphql -f query='
17+ query($owner: String!, $repo: String!, $prNumber: Int!, $cursor: String) {
18+ repository(owner: $owner, name: $repo) {
19+ pullRequest(number: $prNumber) {
20+ reviewThreads(first: 100, after: $cursor) {
21+ pageInfo {
22+ hasNextPage
23+ endCursor
24+ }
25+ nodes {
26+ isResolved
27+ isOutdated
28+ comments(first: 20) {
29+ nodes {
30+ author {
31+ login
32+ }
33+ body
34+ path
35+ line
36+ startLine
37+ originalLine
38+ originalStartLine
39+ diffHunk
40+ createdAt
41+ updatedAt
42+ }
43+ }
44+ }
45+ }
46+ }
47+ }
48+ }
49+ ' -f owner=OWNER -f repo=REPO -F prNumber=PR_NUMBER
You can’t perform that action at this time.
0 commit comments