feat(scripts): add review-sync one-shot script#187
Merged
Conversation
Adds scripts/review-sync/ with config.ts and index.ts following the two-file pattern of scripts/triage/. The script scans GitHub Projects v2 issues in configurable source states, inspects linked open PR review threads (via timelineItems CROSS_REFERENCED_EVENT + reviewThreads), and moves issues to in_progress_state when any thread is unresolved or to in_review_state when all threads are resolved. Issues with no linked open PRs or no review threads are skipped. Supports --dry-run. Closes #185 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9 tasks
Owner
Author
|
[Baton Reviewer] Review complete: no actionable findings in the current diff. Ready for human review. Managed by Baton; do not edit the marker line manually. |
keinstn
commented
Jun 24, 2026
keinstn
left a comment
Owner
Author
There was a problem hiding this comment.
Added 3 inline comments covering field-value pagination robustness, non-zero exit signaling on partial failure, and targeted tests for transition branches.
…, exit code, and tests - Increase fieldValues page size from 10 to 50 to avoid silently missing the Status field on projects with many fields - Extract classifyItem into classify.ts (pure function, exported for testing) - Set process.exitCode = 1 when errors > 0 so partial failures surface in automation - Add test/review-sync.test.ts covering all transition branches and config parsing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/review-sync/config.tsto parse YAML frontmatter from aREVIEW_SYNC.mdconfig filescripts/review-sync/index.tswith the main logic: resolve project metadata, page issues in source states, evaluate linked PR review threads, and move issues accordinglyin_progress_statein_review_state--dry-runflag logs planned moves without executing mutationsCloses #185
Test plan
npm run typecheckpassesnpm run lintpassesnpm run testpasses (357 tests)--dry-runagainst a real project to verify output🤖 Generated with Claude Code