• Will Chen's avatar
    feat: support cc:request:now label for immediate PR review trigger (#2618) · 8c39897d
    Will Chen 提交于
    ## Summary
    - Adds `pull_request: types: [labeled]` trigger to
    `pr-review-responder.yml` so that adding the `cc:request:now` label
    immediately runs the pr-fix flow without waiting for CI to complete
    - Refactors the script to handle both `pull_request` and `workflow_run`
    event types, extracting `head_repo`, `head_branch`, and `ci_conclusion`
    as shared step outputs
    - Gates the `needs-human` labeler steps on `ci_conclusion` availability
    (only from `workflow_run` events) since CI status is unknown for
    immediate triggers
    
    ## Test plan
    - [ ] Add `cc:request:now` label to a test PR and verify the workflow
    triggers immediately
    - [ ] Verify existing `cc:request` / `cc:request:N` labels still work
    via the `workflow_run` path
    - [ ] Verify the retry loop works: if Claude pushes commits from a
    `cc:request:now` trigger, confirm it sets `cc:request:1` and subsequent
    retries go through the normal CI-waiting flow
    - [ ] Verify the job-level `if` filter prevents unnecessary runs for
    unrelated label additions
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2618"
    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 -->
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Medium Risk**
    > Adds a new `pull_request_target` label-triggered path to a
    high-permission workflow; while gated by allowed actors and PR author,
    mistakes here could expand when privileged automation runs or what code
    gets checked out/pushed.
    > 
    > **Overview**
    > **Adds an immediate trigger for PR fix loops.**
    `pr-review-responder.yml` now runs not only after `CI` completes, but
    also when a trusted actor applies the `cc:request:now` label, so the
    automation can start without waiting for CI.
    > 
    > **Refactors the workflow to support both event types safely.** The
    PR-info step now branches on event type to derive `pr_number`,
    `head_repo`, `head_branch`, and (only for `workflow_run`)
    `ci_conclusion`, uses these outputs for checkout and retry detection,
    and skips the needs-human labeler steps when CI conclusion is
    unavailable.
    > 
    > **Docs/process updates.** Updates the workflows README to document the
    new trigger and removes outdated guidance about auto-adding `cc:request`
    from the `pr-push` command; adds a small rebase-conflict tip for
    documentation table merges.
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    7fa3a013b815dda47ab643fd9b23f51f6feac59b. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Enable immediate PR review runs via the cc:request:now label, using
    pull_request_target with strict labeler and author gating. The existing
    cc:request/cc:request:N CI-driven flow stays the same.
    
    - **New Features**
    - Trigger pr-review-responder on pull_request_target labeled when the
    label is cc:request:now.
    - Guarded start with a job-level filter; only labels applied by
    wwwillchen, wwwillchen-bot, azizmejri1, or princeaden1 are allowed, and
    only PRs authored by wwwillchen/wwwillchen-bot are eligible.
    
    - **Refactors**
    - Support both pull_request_target and workflow_run; expose pr_number,
    head_repo, head_branch, and ci_conclusion as shared outputs and use them
    for checkout/status.
    - Gate needs-human labeling on ci_conclusion (workflow_run only);
    cc:request:now skips it. Add null checks for head_repository and exclude
    cc:request:now in workflow_run label checks to avoid race conditions.
    - Docs: update workflow trigger README, remove outdated label
    instructions in .claude/commands/dyad/pr-push.md, and add rebase
    guidance to keep both additions in README tables.
    
    <sup>Written for commit 7fa3a013b815dda47ab643fd9b23f51f6feac59b.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    
    ---------
    Co-authored-by: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    8c39897d
名称
最后提交
最后更新
.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 正在载入提交数据...
.npmrc 正在载入提交数据...
.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 正在载入提交数据...