# pr-operations > Use when working with PR review comments, resolving threads, or replying to discussion comments. Essential for understanding the correct erk exec commands for PR thread operations. - Author: Nick Schrock - Repository: dagster-io/erk - Version: 20260122052601 - Stars: 69 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/dagster-io/erk - Web: https://mule.run/skillshub/@@dagster-io/erk~pr-operations:20260122052601 --- --- name: pr-operations description: Use when working with PR review comments, resolving threads, or replying to discussion comments. Essential for understanding the correct erk exec commands for PR thread operations. --- # PR Operations Skill ## Core Rule > **CRITICAL: Use ONLY `erk exec` Commands for PR Thread Operations** > > - ❌ DO NOT use raw `gh api` calls for thread operations > - ❌ DO NOT use `gh pr` commands directly for thread resolution > - ✅ ONLY use `erk exec` commands listed below > > The `erk exec` commands handle thread resolution correctly. Raw API calls only reply without resolving. ## Quick Reference | Command | Purpose | Key Point | | ----------------------------- | ------------------------------- | ------------------------------ | | `get-pr-review-comments` | Fetch unresolved review threads | Returns threads with line info | | `get-pr-discussion-comments` | Fetch PR discussion comments | Returns top-level comments | | `resolve-review-thread` | Reply AND resolve a thread | Does both in one operation | | `reply-to-discussion-comment` | Reply to discussion comment | For non-code feedback | | `post-pr-inline-comment` | Post new inline comment | Creates new review thread | ## When to Use Each Command ### Fetching Comments ```bash # Get all unresolved review threads (code comments) erk exec get-pr-review-comments # Get all discussion comments (top-level PR comments) erk exec get-pr-discussion-comments # Include resolved threads (for reference) erk exec get-pr-review-comments --all ``` ### Resolving Review Threads ```bash # Always use this to resolve review threads - it replies AND resolves erk exec resolve-review-thread --thread-id "PRRT_abc123" --comment "Fixed in commit abc1234" ``` ### Replying to Discussion Comments ```bash # For PR discussion comments (not code review threads) erk exec reply-to-discussion-comment --comment-id 12345 --reply "**Action taken:** Updated the docs as requested." ``` ## Common Mistakes | Mistake | Why It's Wrong | Correct Approach | | ---------------------------------------------- | ----------------------------- | ------------------------------------- | | Using `gh api repos/.../comments/{id}/replies` | Only replies, doesn't resolve | Use `erk exec resolve-review-thread` | | Using `gh pr comment` | Doesn't resolve threads | Use `erk exec resolve-review-thread` | | Skipping resolution for outdated threads | Threads stay open in PR | Always resolve, even if already fixed | | Generic replies like "Noted" | Not useful for PR history | Include investigation findings | ## Replying vs Resolving > **IMPORTANT: Replying ≠ Resolving** > > - **Replying** (via raw `gh api .../replies`): Adds a comment but thread stays OPEN > - **Resolving** (via `erk exec resolve-review-thread`): Adds a comment AND marks thread as RESOLVED > > Always use `erk exec resolve-review-thread` - it does both in one operation. ## Detailed Documentation For complete command documentation including JSON output formats, options, and examples: @references/commands.md