Files
moreminimore-vibe/scripts
Will Chen 7cf8317f55
Some checks failed
CI / test (map[image:macos-latest name:macos], 1, 4) (push) Has been cancelled
CI / test (map[image:macos-latest name:macos], 2, 4) (push) Has been cancelled
CI / test (map[image:macos-latest name:macos], 3, 4) (push) Has been cancelled
CI / test (map[image:macos-latest name:macos], 4, 4) (push) Has been cancelled
CI / test (map[image:windows-latest name:windows], 1, 4) (push) Has been cancelled
CI / test (map[image:windows-latest name:windows], 2, 4) (push) Has been cancelled
CI / test (map[image:windows-latest name:windows], 3, 4) (push) Has been cancelled
CI / test (map[image:windows-latest name:windows], 4, 4) (push) Has been cancelled
CI / merge-reports (push) Has been cancelled
Fix Playwright report comments on forked PRs (#1975)
## 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. -->
2025-12-17 17:30:58 -08:00
..
2025-07-21 11:07:53 -07:00
2025-04-11 09:38:16 -07:00

Scripts

This directory contains utility scripts for the project.

extract-codebase.ts

A script that extracts code files from a directory, respecting .gitignore rules, and outputs them in a format suitable for LLM consumption.

Usage

# Make the script executable first
chmod +x scripts/extract-codebase.ts

# Run with default options (current directory, output to codebase-extract.md)
./scripts/extract-codebase.ts

# Specify a source directory and output file
./scripts/extract-codebase.ts ./src ./output.md

Features

  • Walks through the specified directory recursively
  • Respects all .gitignore rules
  • Extracts files with extensions: .ts, .tsx, .js, .jsx, .css
  • Formats output with markdown code blocks, including file paths
  • Writes all extracted code to a single markdown file

verify-release-assets.js

A script that verifies all expected binary assets are present in the GitHub release for the current version in package.json.

Usage

# Set GITHUB_TOKEN environment variable
export GITHUB_TOKEN=your_github_token

# Run the verification script
npm run verify-release

# Or run directly
node scripts/verify-release-assets.js

Expected Assets

The script verifies the presence of these 7 assets for each release:

  1. dyad-{version}-1.x86_64.rpm (Linux RPM)
  2. dyad-{version}-full.nupkg (Windows NuGet package)
  3. dyad-{version}.Setup.exe (Windows installer)
  4. dyad-darwin-arm64-{version}.zip (macOS Apple Silicon)
  5. dyad-darwin-x64-{version}.zip (macOS Intel)
  6. dyad_{version}_amd64.deb (Linux DEB)
  7. RELEASES (Windows update manifest)

Features

  • Reads version from package.json automatically
  • Fetches release information from GitHub API
  • Lists all expected vs actual assets
  • Fails with clear error messages if assets are missing
  • Shows warnings for unexpected assets
  • Provides detailed release summary on success