chore(ci): exclude Storybook stories from PR tiering - #2989
chore(ci): exclude Storybook stories from PR tiering#2989brandon-pereira wants to merge 1 commit into
Conversation
Story files are dev-only fixtures that never ship in the app bundle, so their churn should not count toward production line totals or the cross-layer signal in the PR triage classifier. Add a .stories.[jt]sx? pattern to TEST_FILE_PATTERNS so they're excluded like tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
🟢 Tier 1 — TrivialDocs, images, lock files, a dependency bump, or an automated release. No functional code changes detected. Why this tier:
Review process: Auto-merge once CI passes. No human review required. Stats
|
Greptile SummaryThis PR updates PR triage classification so JavaScript and TypeScript Storybook stories are treated like other dev-only test fixtures.
Confidence Score: 5/5The PR appears safe to merge because the new exclusion matches the repository’s dev-only Storybook file convention without affecting non-story files. Story files are consumed by separate Storybook tooling rather than the production application build, and the suffix-specific pattern correctly applies the intended tiering exclusion.
|
| Filename | Overview |
|---|---|
| .github/scripts/pr-triage-classify.js | Adds a narrowly scoped story-file pattern to the existing test-file exclusions; no actionable classification defect was identified. |
| .github/scripts/tests/pr-triage-classify.test.js | Adds focused positive coverage for .stories.ts and .stories.tsx matching. |
Reviews (1): Last reviewed commit: "chore(ci): exclude Storybook stories fro..." | Re-trigger Greptile
|
review: Deep Review✅ No critical issues found. The change routes 🟡 P2 -- recommended
🔵 P3 nitpicks (1)
Reviewers (3): correctness, testing, maintainability. Testing gaps: No tier-level assertion that a |
E2E Test Results✅ All tests passed • 306 passed • 1 skipped • 1223s
Tests ran across 4 shards in parallel. |
Why
The PR triage classifier (
.github/scripts/pr-triage-classify.js) currently treats Storybook story files (*.stories.tsx/*.stories.ts) as regular production code. Their churn counts towardprodLines— which drives the tier — and flips on thetouchesFrontendcross-layer signal.Stories are dev-only fixtures: they're never included in the shipped app bundle and carry no production risk. They belong with tests and docs in the "excluded from tiering" bucket, not with reviewable production code.
What
\.stories\.[jt]sx?$pattern toTEST_FILE_PATTERNSso stories are excluded from line-counting exactly like.test.*/.spec.*files already are.isTestFileunit test.No behavior change for any non-story file. All 113 classifier tests pass.