Skip to content

Instantly share code, notes, and snippets.

@BYK
Created December 29, 2025 14:47
Show Gist options
  • Select an option

  • Save BYK/6bace59aef2b9c3c8d9c7f21d50e3195 to your computer and use it in GitHub Desktop.

Select an option

Save BYK/6bace59aef2b9c3c8d9c7f21d50e3195 to your computer and use it in GitHub Desktop.
Cursor Commands

address-pr-review

Address all unresolved comments from the PR by making a todo list. Either respond to them or mark them as resolved. Don't stop until the todo items are all done.

Use the following command to get the unresolved comments:

gh api graphql -F owner='<REPO_OWNER>' -F name='<REPO_NAME>' -F number=<PR_NUMBER> -f query='query($owner: String!, $name: String!, $number: Int!) { repository(owner: $owner, name: $name) { pullRequest(number: $number) { reviewThreads(first: 100) { nodes { isResolved comments(first: 100) { nodes { diffHunk body startLine line isMinimized } } } } } } }' -q '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false) | .comments.nodes[] | select(.isMinimized == false) | {diff_hunk: .diffHunk, line: .line, start_line: .startLine, body: .body}]'

You'll need to replace <REPO_OWNER>, <REPO_NAME>, and <PR_NUMBER> with relevant values for the current repo and PR. (You can probably get them by running gh pr status or gh pr view)

fix-ci

Keep running

gh run view --log-failed --job $(gh pr checks $PR_NO --json  state,link  -q '.[] | select(.state == "FAILURE").link | split("/")[-1]')'

to get all failing jobs after you push and do not stop until there are no more failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment