• Will Chen's avatar
    feat: add needs-human PR status labels and unified review marker (#2589) · 56c2b0fc
    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: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    56c2b0fc
名称
最后提交
最后更新
.claude 正在载入提交数据...
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
.storybook 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
makers 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
rules 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.oxfmtrc.json 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
AGENTS.md 正在载入提交数据...
CLA.md 正在载入提交数据...
CLAUDE.md 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
lint-staged.config.js 正在载入提交数据...
merge.config.ts 正在载入提交数据...
package-lock.json 正在载入提交数据...
package.json 正在载入提交数据...
playwright.config.ts 正在载入提交数据...
tsconfig.app.json 正在载入提交数据...
tsconfig.json 正在载入提交数据...
tsconfig.node.json 正在载入提交数据...
vite.main.config.mts 正在载入提交数据...
vite.preload.config.mts 正在载入提交数据...
vite.renderer.config.mts 正在载入提交数据...
vite.worker.config.mts 正在载入提交数据...
vitest.config.ts 正在载入提交数据...
windowsSign.ts 正在载入提交数据...