{"id":30920426,"url":"https://github.com/kud/gh-pr-comments","last_synced_at":"2026-05-20T05:05:44.912Z","repository":{"id":312767186,"uuid":"1048580742","full_name":"kud/gh-pr-comments","owner":"kud","description":"Browse GitHub PR review discussions.","archived":false,"fork":false,"pushed_at":"2025-09-02T22:22:42.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-03T00:21:45.797Z","etag":null,"topics":["gh","git"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kud.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-01T17:12:03.000Z","updated_at":"2025-09-02T22:21:58.000Z","dependencies_parsed_at":"2025-09-03T00:21:46.511Z","dependency_job_id":null,"html_url":"https://github.com/kud/gh-pr-comments","commit_stats":null,"previous_names":["kud/gh-review-pull-request","kud/gh-pr-comments"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kud/gh-pr-comments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kud%2Fgh-pr-comments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kud%2Fgh-pr-comments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kud%2Fgh-pr-comments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kud%2Fgh-pr-comments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kud","download_url":"https://codeload.github.com/kud/gh-pr-comments/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kud%2Fgh-pr-comments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274395847,"owners_count":25277387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gh","git"],"created_at":"2025-09-10T01:19:32.348Z","updated_at":"2026-05-20T05:05:44.906Z","avatar_url":"https://github.com/kud.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ✨ gh pr-comments\n\nBrowse GitHub PR review comments with fzf.\n\nThis is a GitHub CLI extension that lets you filter unresolved review threads for a pull request, preview comment context, copy a comment to your clipboard, or open it in the browser.\n\n## 📦 Install\n\nFrom a local checkout of this repo:\n\n```\ngh extension install .\n```\n\nOr directly from GitHub:\n\n```\ngh extension install kud/gh-pr-comments\n```\n\n## ▶️ Usage\n\n```\ngh pr-comments                 # infer repo and current PR\ngh pr-comments \u003cnumber\u003e        # browse specific PR number\ngh pr-comments -R owner/repo   # target a specific repository\n```\n\nOptions:\n\n- -a, --author Filter by author (can be repeated)\n- -f, --file \u003cpath/regex\u003e Filter by file path (repeatable)\n- --since \u003cYYYY-MM-DD\u003e Filter comments created on/after date\n- --until \u003cYYYY-MM-DD\u003e Filter comments created on/before date\n- --all, --all-comments Show all comments in threads (not just latest)\n- --include-outdated Include outdated comment threads\n- --json Print parsed comments as JSON and exit\n- --list Print UI list output and exit\n- --resolved Show resolved threads instead of unresolved\n- --sort \u003cfile|date|author\u003e Sorting mode (default: file)\n- --no-color Disable ANSI colors in UI/preview\n- --debug Write a small debug summary file\n- -R, --repo \u003cowner/repo\u003e Target a specific repository\n- -h, --help Show help\n- -v, --version Show version\n\nKeybindings inside fzf:\n\n- **Copy**: Enter / Ctrl-Y (full) • Ctrl-M (Markdown) • Ctrl-U (URL) • Ctrl-B (body)\n- **Open**: Ctrl-O (browser) • Ctrl-E (editor at file:line)\n- **Interact**: Ctrl-R (reply) • Ctrl-] (resolve) • Ctrl-\\ (unresolve)\n- **Toggles**: Alt-A (latest/all) • Alt-O (outdated) • Alt-R (state) • Alt-S (sort)\n- **Help**: ? (toggle help overlay)\n- **Filter**: Just start typing to filter by filename or author in real-time\n\n## 🧰 Requirements\n\n- gh, jq (\u003e= 1.6), fzf\n- awk, sed, base64, wc, tr, nl, cat, cut, rev, perl\n- Optional: glow or mdcat for nicer markdown rendering\n  - Clipboard: pbcopy (macOS) or xclip/xsel (Linux) for copy action\n\n### Install requirements quickly\n\n- macOS (Homebrew):\n\n```\nbrew install gh jq fzf glow mdcat\n```\n\nEnable fzf key bindings (history search, Alt-C, etc.):\n\n```\n$(brew --prefix)/opt/fzf/install\n```\n\nChoose to enable key bindings and shell completion when prompted.\n\n- Ubuntu/Debian:\n\n```\nsudo apt update\nsudo apt install -y gh jq fzf xclip\n# optional renderers: sudo apt install -y glow mdcat\n```\n\n- Fedora:\n\n```\nsudo dnf install -y gh jq fzf xclip\n```\n\n- Arch Linux:\n\n```\nsudo pacman -S --needed github-cli jq fzf xclip\n```\n\nNotes:\n\n- On Linux, ensure `$HOME/.local/bin` is in your `PATH` so tools are discoverable.\n- If your distro doesn’t package `gh`, install it via GitHub’s instructions: https://github.com/cli/cli#installation\n\nWSL clipboard tips:\n\n- This tool supports `pbcopy`, `xclip`, or `xsel` for copying.\n- On WSL without X11, a quick shim is to add this to `~/.zshrc`:\n\n```\npbcopy() { clip.exe; }\n```\n\n- Alternatively, install `xclip` and run an X server, or install `win32yank` and symlink it to `pbcopy`.\n\n## 🧪 Testing locally\n\nYou can bypass live GitHub calls by providing a GraphQL result via the `GH_REVIEW_PR_JSON` env variable. This can be either a path to a file or the JSON string itself.\n\nExample with your own GraphQL response file:\n\n```\nGH_REVIEW_PR_JSON=/path/to/your_graphql.json \\\n  ./gh-pr-comments 123 -R owner/repo --json\n```\n\nThe above prints the parsed comments as JSON (use `--list` to print the UI list instead).\n\n## 🎯 Workflow\n\n**Pre-filter on launch** (command-line options):\n\n- `-f src/app.py` — Filter by file path/regex (repeatable)\n- `-a @alice` — Filter by author (repeatable)\n- `--since 2024-01-01`, `--until 2024-01-31` — Filter by date range\n- `--resolved` — Show resolved threads instead of unresolved\n- Combine: `-f src -a @alice --since 2024-01-01`\n\n**Filter in real-time** (inside fzf):\n\n- Start typing to search by filename, author, or date\n- Press **Ctrl-R** to refresh and fetch latest comments from GitHub\n- Use **Alt-A** / **Alt-O** / **Alt-R** / **Alt-S** to toggle views\n\n**Copy \u0026 Open**:\n\n- **Enter** or **Ctrl-Y**: Copy full comment with context\n- **Ctrl-M**: Copy as Markdown (great for responses)\n- **Ctrl-O**: Open in browser\n- **Ctrl-E**: Jump to file:line in your editor\n\n## 🔎 Filtering tips\n\n- File-first list: the UI list now starts with the file path for quick scanning.\n- Filter by file: `-f src/app.py` can be repeated. Values are treated as regex by jq's `test(...)`, so you can use patterns like `-f '^src/.*\\.py$'`.\n- Filter by date: `--since 2024-01-01`, `--until 2024-01-31` (inclusive, UTC based on `createdAt`).\n- Combine filters: `-f src -a @alice --since 2024-01-01 --include-outdated`.\n\nSorting and state:\n\n- Sort: `--sort date` to sort by newest first; `--sort author` groups by author.\n- Resolved: `--resolved` to browse resolved threads as a follow-up queue.\n\nColor:\n\n- Disable colors with `--no-color` or `NO_COLOR=1`.\n\n## 📝 Notes\n\n- By default, only the latest non-outdated comment of each unresolved thread is shown. Use `--all` to see every comment, and `--include-outdated` to include outdated threads.\n- `--author` accepts either `user` or `@user`. `copilot` is normalized to `copilot-pull-request-reviewer`.\n- If no unresolved comments are found, try `--all` or `--include-outdated`.\n- On Linux, ensure `$HOME/.local/bin` is in your `PATH` so `fzf`/`jq` can be found.\n\n## 🏷️ Versioning \u0026 Releases\n\nThis project follows Semantic Versioning (SemVer). Release workflow:\n\n1. Determine the next version (e.g. `v0.1.1`) based on the changes (fix = patch, new backward‑compatible feature = minor, breaking change = major).\n2. Update `CHANGELOG.md` with a new section for the version (include date):\n\n```\n## v0.1.1 - 2025-09-04\n- Add ...\n- Fix ...\n```\n\n3. Commit and tag:\n\n```\ngit add CHANGELOG.md\ngit commit -m \"chore(release): v0.1.1\"\ngit tag v0.1.1\ngit push \u0026\u0026 git push --tags\n```\n\nUsers can check the installed version with:\n\n```\ngh pr-comments --version\n```\n\n## 🛠️ Troubleshooting\n\n- **GitHub auth error**: If the API call fails, run `gh auth status` and `gh auth login`.\n- **No comments found**: Try `--all`, `--include-outdated`, or `--resolved`. Also check filters like `--author`, `--file`, `--since/--until`.\n- **Refresh (Ctrl-R) fails**: Check the error message in the preview pane. Common causes:\n  - Not authenticated: run `gh auth status` and `gh auth login`\n  - Network issues: ensure GitHub is reachable\n  - If refresh shows an error, your old list is preserved automatically\n- **Search/filter not working**: Just start typing in fzf - it searches across filenames, authors, and dates\n- **Clipboard not working**: Install `pbcopy` (macOS), `xclip`/`xsel` (Linux). On WSL, add `pbcopy() { clip.exe; }` to your shell or install `win32yank`.\n- **Colors look noisy**: Use `--no-color` or set `NO_COLOR=1`. Piping output? Prefer `--no-color`.\n- **fzf not launching**: Ensure `fzf` is installed and your `TERM` is not `dumb` (use a real terminal). On macOS, run `$(brew --prefix)/opt/fzf/install` to enable key bindings.\n- **jq version**: Requires jq \u003e= 1.6 (for `fromdateiso8601`). Check with `jq --version` and upgrade if needed.\n- **Markdown rendering**: If `glow`/`mdcat` are missing, plain text is shown. Install one for nicer previews.\n- **Open in editor (Ctrl-E) does nothing**: Set the `EDITOR` env var, or ensure `code` is available for VS Code. Falls back to `vim`.\n- **Large PRs**: Extremely long diff hunks are collapsed for performance in previews. Currently up to 100 comments per thread are fetched.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkud%2Fgh-pr-comments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkud%2Fgh-pr-comments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkud%2Fgh-pr-comments/lists"}