Use when multiple `review-output-format` JSON files must be merged into one result and submitted as a single GitHub PR review where each finding becomes one inline `comments[]` item.
Merge multiple JSON files produced by review-output-format, create one GitHub PR review payload, and submit it in one API call.
This skill guarantees:
Blocker, Major, Minor, Info, Nit)comments[] object when an inline anchor is availablepr_linkhttps://github.com/<owner>/<repo>/pull/<number>input_files (required)
review-output-format: top-level { "findings": [] }--input flags or --input-globmerged_output (optional)
merged-review-output.jsonpayload_output (optional)
github-review-payload.jsonBefore running the script, the agent must consolidate semantically similar findings across input_files manually:
path + line) when availablewhy, risk_if_unchanged, evidence, and change_request content without losing unique detailsreview-output-format)The script intentionally does not perform semantic matching or semantic merge.
Inline anchor resolution for each finding:
path + line directly if presentscope with <path>:<line>python3 ./merge-review-json-and-submit-pr-review/scripts/merge_and_submit_review.py \
--pr-link "https://github.com/pingcap/tidb/pull/12345" \
--input semantic-merged-review.json \
--merged-output merged-review-output.json \
--payload-output github-review-payload.json
Use globs when needed:
python3 ./merge-review-json-and-submit-pr-review/scripts/merge_and_submit_review.py \
--pr-link "https://github.com/pingcap/tidb/pull/12345" \
--input-glob "outputs/reviews/*.json"
Generate merged JSON and payload without posting:
python3 ./merge-review-json-and-submit-pr-review/scripts/merge_and_submit_review.py \
--pr-link "https://github.com/pingcap/tidb/pull/12345" \
--input-glob "outputs/reviews/*.json" \
--dry-run
Submission requires GitHub CLI authentication:
gh auth status
If unauthenticated, run:
gh auth login
The script writes:
merged_output)payload_output)Then it prints one JSON result object with counts and submission status.