ci: Run ESLint only on changed files in a PR#116660
Conversation
📊 Type Coverage Diff✅ no issues found |
991db6c to
0c94149
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0c94149. Configure here.
| - *sentry_frontend_snapshots_workflow_file | ||
| - added|modified: '**/*.{ts,tsx,js,jsx,mjs}' | ||
| - added|modified: 'static/**/*.{less,json,yml,md,mdx}' | ||
| - added|modified: '{vercel,tsconfig,biome,package}.json' |
There was a problem hiding this comment.
New lintable_modified filter duplicates frontend_all exactly
Low Severity
The lintable_modified filter (lines 42–47) is byte-for-byte identical to the frontend_all filter (lines 58–63). This means lintable_modified_files and frontend_all_files always produce the same file list. If either filter is updated in the future without updating the other, they'd silently diverge, leading to subtle bugs. Additionally, the frontend_all_files output (line 35) and the lintable_modified boolean output (line 31) are both defined but never consumed by any downstream job. The eslint step could simply use frontend_all_files directly, avoiding the duplicate filter entirely.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 0c94149. Configure here.
There was a problem hiding this comment.
this'll improve/change over time. better to have the name in place now imo
|
PR reverted: 2d296b1 |
This reverts commit 5c59d63. Co-authored-by: ryan953 <187460+ryan953@users.noreply.github.com>


During a PR CI run, only run ESLint against the files that were changed.
The step will, as before, only run if some
frontend_allfiles were detected in the PR. It'll pass all those filenames to eslint to work on.The matcher for those files is: https://github.com/getsentry/sentry/blob/master/.github/file-filters.yml#L43-L48
The CI run for this PR proves that it works well:
ESLint got the list of files (just the one file) and tried to run. Nothing to do this time because it's a *.yml, we're happy the triggers and file list are being passed along correctly.