ReviewOS

also looking at this

stacks/buddy

fix(review): read what publishing reported, honour reviewSuggestions, and un-strand two flags

#1435
Merged glennmichael123 wants to merge fix/review-low-tier into main
5 files +267 -10
bin/cli.tsmodified+12-0
Changes to bin/cli.ts
@@ -1645,6 +1645,10 @@ cli
16451645 // `--auto` is what the generated workflow passes. Without it this is
16461646 // someone at a terminal, who has already decided they want a review.
16471647 trigger: options.auto ? 'automatic' : 'requested',
1648 // The workflow fires on every edited event, so without this the
1649 // same head commit would be reviewed again each time the PR body
1650 // changes. A person re-running the command still gets their review.
1651 ...(options.auto ? { skipIfReviewed: true } : {}),
16481652 logger: log,
16491653 dryRun: Boolean(options.dryRun),
16501654 ...(options.summaryOnly ? { summaryOnly: true } : {}),
@@ -1707,6 +1711,14 @@ cli
17071711
17081712 process.stdout.write(formatReview(result, format))
17091713
1714 // `--fix` was accepted here and silently ignored: the light branch
1715 // returned before the block that applies suggestions, so the flag
1716 // worked everywhere except the one mode fast enough for a hook.
1717 if (options.fix) {
1718 const applied = await applyFixes(result.findings, Boolean(options.yes), logger)
1719 logger.success(`\u{1f527} Applied ${applied} suggestion(s)`)
1720 }
1721
17101722 if (options.failOn && shouldFail(result.findings, options.failOn as 'critical'))
17111723 process.exit(1)
17121724 return