-
由 Will Chen 提交于
## Summary - Add two new `needs-human:*` labels to triage PRs: `needs-human:review-issue` (PR needs attention) and `needs-human:final-check` (PR is green and ready for merge) - Create shared `scripts/pr-status-labeler.js` that determines the correct label based on CI conclusion + latest Dyadbot code review comment - Create new `pr-status-labeler.yml` workflow for PRs not managed by the cc:request retry loop - Update `pr-review-responder.yml` to apply needs-human labels at terminal states (cc:done, cc:failed, retries exhausted) - Unify review comment headers to "Dyadbot Code Review Summary" across both multi-agent and swarm review skills for reliable detection ## Test plan - [ ] Open a test PR with passing CI and clean review → verify `needs-human:final-check` label is added - [ ] Open a test PR with failing CI → verify `needs-human:review-issue` label is added - [ ] Verify PRs with `cc:request*` labels are skipped by the new `pr-status-labeler` workflow - [ ] Verify labels are mutually exclusive (adding one removes the other) - [ ] Verify review comments show the new "Dyadbot Code Review Summary" header
🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2589" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end --> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Automatically labels PRs as needs-human:review-issue or needs-human:final-check based on CI and the latest Dyadbot review. Standardizes the review comment header to “Dyadbot Code Review Summary” and hardens detection with stale-review checks, pagination, and atomic label updates. - New Features - Added scripts/pr-status-labeler.js to choose labels using CI conclusion + latest “Dyadbot Code Review Summary”. - New pr-status-labeler.yml runs on CI completion; skips PRs with cc:request* or cc:pending; checks out the default branch for trusted scripts. - pr-review-responder.yml applies needs-human labels at terminal states and checks out the base repo so the shared script is always present. - Bug Fixes - Hardened review parsing: match only non-zero severities, allow LOW-only pass, default fail-closed, and verify bot author. - Paginate comment fetch and detect stale reviews by comparing review time to the latest commit. - Make label changes atomic with setLabels; ensureLabel now only swallows 422 errors. <sup>Written for commit 2fc253289e509cddbf6ed6202f4bce2435cbc791. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches GitHub Actions automation that edits PR labels based on CI and bot comments, so misclassification could affect review/merge triage. Changes are localized to workflows/scripts and are fail-closed when review format is unrecognized. > > **Overview** > Adds automated PR status labeling via new `needs-human:review-issue` and `needs-human:final-check` labels, driven by CI conclusion plus the latest Dyadbot review summary comment. > > Introduces shared `scripts/pr-status-labeler.js` and a new `pr-status-labeler.yml` workflow to apply these labels for PRs *not* in the `cc:request*` retry loop; updates `pr-review-responder.yml` to apply the same labeling at terminal states and when retries are exhausted (including a base-repo checkout so the script is available for fork PRs). > > Standardizes the review summary header/footer text across multi-agent and swarm review outputs to `Dyadbot Code Review Summary` so the labeler can reliably detect and evaluate review cleanliness. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2fc253289e509cddbf6ed6202f4bce2435cbc791. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by:Claude Opus 4.6 <noreply@anthropic.com>