-
Notifications
You must be signed in to change notification settings - Fork 282
feat: visual comparison CI workflow #3884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📖 Docs PR preview linksThis PR does not change any pages in /docs. If you make updates, links to the modified pages will appear here. |
|
Semgrep found 9
No explicit |
Add explicit permissions blocks to all jobs in the visual comparison workflows to address Semgrep security findings. Following least-privilege principle: - visual-comparison.yml: Added permissions for contents, actions, and pull-requests - screenshot-capture.yml: Added permissions for contents and actions - cleanup-report.yml: Added permissions for contents write 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move all GitHub context variables in run steps to environment variables to prevent script injection attacks. This addresses Semgrep findings for: - visual-comparison.yml: github.base_ref, github.head_ref, github.ref_name, github.run_id, github.run_attempt - cleanup-report.yml: github.event.ref Branch names and other GitHub context data can contain special characters that could lead to command injection when directly interpolated in bash. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change trigger label from 'visual-tests' to 'visual-comparison' - Remove branches-ignore for version-* and docs-rel-* (not applicable to this repo) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove @playwright/test from dependencies to resolve conflict with devDependencies. Playwright is a testing tool and should only be in devDependencies (^1.55.1). This fixes the "Your lockfile needs to be updated" error in CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add step to automatically create the gh-pages branch when it doesn't exist, allowing the workflow to publish HTML reports on first run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Check if gh-pages branch exists before attempting checkout or creation. This avoids the git state issues that were causing the previous approach to fail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move git config step before the commit to avoid "empty ident name" error. Also set git user for both the creation and existing branch paths. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use `git push -u origin gh-pages` when creating the branch - Use explicit `origin gh-pages` in pull/push commands to avoid tracking issues This fixes the "no tracking information for the current branch" error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Make branch creation non-failing if branch already exists (race condition) - Always checkout gh-pages after creation attempt, simplifying the flow - Set git user once for all cases The gh-pages branch now exists, so future runs will skip creation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
📋 Visual Report for branch visual-comparison with CI run 20446936180 and attempt 1 is ready at 💡 You may have to wait for DNS to resolve or the GitHub Pages job to complete. You can view the progress of the GitHub Pages job here. |
What does this PR do?
Notes to reviewers