mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 21:37:41 +00:00
## Summary Simplify the knip GitHub Action and expand where it runs: - **Remove main-branch comparison** — knip now reports all issues found on the current branch rather than diffing against main. This makes the output more straightforward and actionable. - **Fail on errors** — the job calls `core.setFailed()` when knip finds issues, so the check shows as failed on the PR. - **Run on push to main** — added `push` trigger so knip also runs when commits land on main. - **Support fork PRs** — on fork PRs, the GITHUB_TOKEN can't write to the base repo, so the action skips PR commenting and logs results to the Actions console instead. ### How to test locally or on Vercel 1. Open a PR from a non-fork branch — knip should comment on the PR with results 2. Push to main — knip should run and log results to the Actions console without attempting to comment 3. (Fork PR) — knip should run, log results to the console, and skip commenting ### References - Related PRs:
39 lines
1.1 KiB
JSON
39 lines
1.1 KiB
JSON
{
|
|
"$schema": "https://unpkg.com/knip@6/schema.json",
|
|
"workspaces": {
|
|
"packages/app": {
|
|
"entry": ["pages/**/*.{ts,tsx}", "scripts/*.js", "tests/e2e/**/*.ts"],
|
|
"project": ["src/**/*.{ts,tsx}", "pages/**/*.{ts,tsx}"],
|
|
"ignore": [".storybook/public/**"],
|
|
"ignoreDependencies": [
|
|
"eslint-config-next",
|
|
"@chromatic-com/storybook",
|
|
"@storybook/addon-themes"
|
|
]
|
|
},
|
|
"packages/api": {
|
|
"entry": [
|
|
"src/index.ts",
|
|
"src/tasks/index.ts",
|
|
"scripts/*.ts",
|
|
"src/fixtures.ts"
|
|
],
|
|
"project": ["src/**/*.ts"],
|
|
"ignoreDependencies": ["pino-pretty", "aws4"],
|
|
"ignore": ["src/opamp/**", "src/utils/logParser.ts"]
|
|
},
|
|
"packages/common-utils": {
|
|
"entry": ["src/**/*.ts", "!src/__tests__/**", "!src/**/*.test.*"],
|
|
"project": ["src/**/*.ts"]
|
|
}
|
|
},
|
|
"ignore": ["scripts/dev-portal/**"],
|
|
"ignoreBinaries": ["make", "migrate", "playwright"],
|
|
"ignoreDependencies": [
|
|
"@dotenvx/dotenvx",
|
|
"concurrently",
|
|
"dotenv",
|
|
"babel-plugin-react-compiler"
|
|
],
|
|
"exclude": ["enumMembers", "duplicates"]
|
|
}
|