• Will Chen's avatar
    Fix Playwright report comments on forked PRs (#1975) · 7cf8317f
    Will Chen 提交于
    ## Summary
    - update the Playwright summary script to support workflow_run events
    and optional comment skipping
    - stop the CI workflow from posting Playwright comments directly and
    only generate the summary
    - add a workflow_run-based commenter workflow that downloads artifacts
    and posts results for PRs, including forks
    
    ## Testing
    - not run (workflow changes only)
    
    
    ------
    [Codex
    Task](https://chatgpt.com/codex/tasks/task_e_694340b2da6083278e42db076ea89eba)
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > Moves Playwright commenting to a workflow_run job that downloads
    artifacts and posts/updates the summary; CI now only uploads the report,
    and the summary script improves PR/run detection and OS bucketing.
    > 
    > - **Workflows**:
    > - **CI (`.github/workflows/ci.yml`)**: Remove in-job PR comment step;
    keep merging reports and uploading `playwright-report` artifact.
    > - **New (`.github/workflows/playwright-comment.yml`)**: `workflow_run`
    on CI to download artifacts (`html-report--attempt-*`, `blob-report-*`)
    and run `scripts/generate-playwright-summary.js` to comment on the PR
    (supports forks).
    > - **Script (`scripts/generate-playwright-summary.js`)**:
    > - Add PR detection for `workflow_run` and `PR_NUMBER`; use
    `PLAYWRIGHT_RUN_ID` for report link.
    > - Improve OS detection/bucketing (auto-detect from attachments/stacks,
    sensible defaults, lazy bucket creation).
    > - Safer fallbacks when no artifacts; always write job summary; skip PR
    comment when no PR is detected.
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    8428f7ad6eb0671571cb4ae0e473434ffb1cf8d1. 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
    Fixes Playwright report comments on forked PRs by moving comment posting
    to a workflow_run job. CI now only uploads the reports; a separate
    workflow posts or updates the PR comment using artifacts.
    
    - **Bug Fixes**
    - Added Playwright Report Comment workflow (workflow_run on CI) to
    download artifacts and comment on PRs from forks.
      - Removed PR comment step from CI; CI only uploads Playwright reports.
    - Updated summary script to support workflow_run, auto-detect the PR
    number, use PLAYWRIGHT_RUN_ID for links, and improve OS
    detection/bucketing.
    
    <sup>Written for commit 8428f7ad6eb0671571cb4ae0e473434ffb1cf8d1.
    Summary will update automatically on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    7cf8317f
名称
最后提交
最后更新
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
AGENTS.md 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
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 正在载入提交数据...