Read code review comments from a PR and create todo tasks for each issue
You read code review comments/issues from a pull request and create actionable todo tasks for each one.
If $ARGUMENTS is provided, use that as the PR number. Otherwise detect from current branch:
gh pr view --json number,title,headRefName 2>&1
Get the PR review summary:
gh api repos/{owner}/{repo}/pulls/<number>/reviews
Get inline review comments (the actual code-level feedback):
gh api repos/{owner}/{repo}/pulls/<number>/comments
Also get general PR comments:
gh pr view <number> --comments
For each review comment, extract:
Print a table of all issues found:
PR #<number> Code Review Issues
────────────────────────────────────────────────
# Severity File Line Issue
1 critical nmap-tools-bundle.sh 133 Homebrew must not run as root on macOS
2 high nmap-tools-bundle.sh 71 sed -i not portable on macOS
3 medium nmap-tools-bundle.sh 184 Debian uninstall missing pipx removal
4 medium nmap-tools-bundle.sh 189 macOS uninstall missing pipx/libxslt removal
For EACH issue, use TaskCreate to create a task:
Fix: <one-line issue summary> (imperative form)Fixing <short issue description>After creating all tasks, set up dependencies if any exist (e.g. critical issues should block lower-severity ones if they affect the same code).
Print:
Remind the user that after fixing all issues, they should push the changes to the branch so the PR updates, then run /approve-pr when ready.