pr-review-comments

Featured

Posts review findings from a JSON file as inline comments on a GitHub Pull Request, attaching each comment to its file and line. Use when you have a list/JSON of review findings (each with a file path, line number, and a message such as summary/failure_scenario) and want them published on a PR as inline review comments. Triggers include "post these review comments on the PR", "associate comments to files in the PR", "publish review findings to PR

Code & Development 330 stars 39 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
84
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# PR Review Comments Publish a JSON array of review findings as inline comments on a GitHub Pull Request, each anchored to its file and line. Uses the GitHub API through the authenticated `gh` CLI, so no token handling is needed. ## Prerequisites - `gh` CLI installed and authenticated (`gh auth status`). The script auto-detects the repo with `gh repo view`; pass `--repo OWNER/REPO` to override. - The PR number to comment on. - A JSON file: an **array** of objects. Required keys per object: `file`, `line`. Message comes from `summary` and/or `failure_scenario` (combined into the body), or an explicit `body`. See [references/json-schema.md](references/json-schema.md) for the full schema and a sample. ## Key constraint: only diff lines are commentable GitHub only accepts an inline comment if the target line is part of the PR's diff. `line` is the line number in the **new** file (use `side: "LEFT"` for removed lines). The script fetches the PR diff, validates every finding against the actual hunks, and **skips** any whose line is outside the diff — reporting them at the end so nothing is lost silently. There is no way to attach a line comment to an unchanged, undiffed line. ## Workflow 1. Confirm the JSON path and the PR number. If the repo isn't obvious, run `gh repo view`. 2. **Dry-run first** to see what will be posted and what gets skipped: ```bash scripts/post_pr_comments.py --pr <N> --json <path> --dry-run ``` 3. Review the "Postable" / "Skipped" cou...

Details

Author
giuseppe-trisciuoglio
Repository
giuseppe-trisciuoglio/developer-kit
Created
10 months ago
Last Updated
2 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category