giuseppe-trisciuoglio/developer-kit

pr-review-comments

Posts review findings from a JSON file as inline comments on a GitHub Pull Request, attaching each comment to its file and line.

Zobacz źródło
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

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 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
  1. Review the "Postable" / "Skipped" counts with the user. If lines were skipped because

the diff moved, the line numbers in the JSON may be stale — reconcile before posting.

  1. Post for real, choosing the mode (see below):
bash
   # Grouped (default): one PR review bundling all comments
   scripts/post_pr_comments.py --pr <N> --json <path> --event COMMENT

   # Individual: one separate inline comment per finding
   scripts/post_pr_comments.py --pr <N> --json <path> --mode individual
  1. Report back the created review/comment URLs and the list of any skipped findings.

Choosing the mode

ModeEndpointUse when
grouped (default)POST /pulls/{n}/reviewsPublishing a set of findings as one review. One notification; can set `--event APPROVE \REQUEST_CHANGES \COMMENT`.
individualPOST /pulls/{n}/commentsAdding standalone comments incrementally, or when each finding should be its own thread/notification.

Default to grouped with --event COMMENT unless the user wants a verdict or separate threads.

Options reference

--pr N              PR number (required)
--json PATH         JSON array of findings (required)
--repo OWNER/REPO   Override auto-detected repo
--mode grouped|individual   Default: grouped
--event COMMENT|APPROVE|REQUEST_CHANGES   Grouped-mode verdict (default COMMENT)
--review-body TEXT  Top-level summary body for the grouped review
--commit SHA        Commit to anchor to (default: PR head SHA)
--dry-run           Validate and print payloads without posting

Notes

  • Multi-line range comments: include start_line (and optional start_side) in the JSON

object alongside line; the script passes them through.

  • Always --dry-run before a real post on an unfamiliar PR — stale line numbers are the

most common failure and the dry-run surfaces them as "skipped" without side effects.

  • The script is the reliable path; don't hand-roll gh api calls for this — it handles

diff validation, repo/commit detection, and body assembly consistently.

z tego samego repozytorium

Więcej Skills

Wszystkie Skills
giuseppe-trisciuoglio
Społeczność

tailwind-css-patterns

Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices. Use when styling React/Vue/Svelte components, building responsive layouts, implementing design systems, or optimizing CSS workflow.

instalacje
6
GitHub Stars
337
Aktualizacja
18 sie
giuseppe-trisciuoglio
Społeczność

aws-lambda-java-integration

Provides AWS Lambda integration patterns for Java with cold start optimization. Use when deploying Java functions to AWS Lambda, choosing between Micronaut and Raw Java approaches, optimizing cold starts below 1 second, configuring API Gateway or ALB integration, or implementing serverless Java applications. Triggers include "create lambda java", "deploy java lambda", "micronaut lambda aws", "java lambda cold start", "aws lambda java performance", "java serverless framework".

instalacje
5
GitHub Stars
337
Aktualizacja
18 sie
giuseppe-trisciuoglio
Społeczność

aws-lambda-typescript-integration

Provides AWS Lambda integration patterns for TypeScript with cold start optimization. Use when creating or deploying TypeScript Lambda functions, choosing between NestJS framework and raw TypeScript approaches, optimizing cold starts, configuring API Gateway or ALB integration, or implementing serverless TypeScript applications. Triggers include "create lambda typescript", "deploy typescript lambda", "nestjs lambda aws", "raw typescript lambda", "aws lambda typescript performance".

instalacje
5
GitHub Stars
337
Aktualizacja
18 sie
giuseppe-trisciuoglio
Społeczność

aws-sdk-java-v2-s3

Provides Amazon S3 patterns and examples using AWS SDK for Java 2.x. Use when working with S3 buckets, uploading/downloading objects, multipart uploads, presigned URLs, S3 Transfer Manager, object operations, or S3-specific configurations.

instalacje
5
GitHub Stars
337
Aktualizacja
18 sie