-
Notifications
You must be signed in to change notification settings - Fork 17
Fix annotations for pull requests #50
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
Conversation
Finalize PR
|
@aswamy Do you have any update on this? We really want to integrate this tool in our CI |
aswamy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @andershagbard, i was just trying to run this on a repo and had a question
| .flatMap((report) => | ||
| report.offenses.map((offense) => ({ | ||
| path: path.relative(root, path.resolve(report.path)), | ||
| path: path.relative(cwd, path.resolve(report.path)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this not from the root anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was because the Shopify files are not necessarily in the root of the repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. might have diff root, so src/snippets/foo.liquid instead of snippets/foo.liquid? Could be useful for multi-root setups, 👍
|
Updated this PR. Threw out all non related to making the annotations work. Will put the other stuff into different PRs |
charlespwd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty!
|
Tested out the latest change and looks like the action works as expected:
|
|
@charlespwd Did the dist build correctly? I am getting these this error now: |
|
@charlespwd getting an error alike @andershagbard npm error Cannot read properties of null (reading 'matches')
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-06-24T08_56_45_265Z-debug-0.log
Error: The process '/root/actions-runner/_work/_tool/node/22.15.1/x64/bin/npm' failed with exit code 1
at ExecState._setResult (/root/actions-runner/_work/_actions/shopify/theme-check-action/v2/dist/index.js:1:24684)
at ExecState.CheckComplete (/root/actions-runner/_work/_actions/shopify/theme-check-action/v2/dist/index.js:1:24244)
at ChildProcess.<anonymous> (/root/actions-runner/_work/_actions/shopify/theme-check-action/v2/dist/index.js:1:23085)
at ChildProcess.emit (node:events:524:28)
at maybeClose (node:internal/child_process:1[104](https://github.com/cybersikker/shopify/actions/runs/15845939450/job/44668025814#step:6:105):16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
Error: The process '/root/actions-runner/_work/_tool/node/22.15.1/x64/bin/npm' failed with exit code 1 |
|
Yeah please. |
|
Seems to be from a dependency? What the hell? I transpiled without minifying and even then I couldn't find where we'd be doing |
|
@charlespwd I think I've had this issue before. I had to use my worker (Linux) to run Example from my repo: - name: Compile assets
run: pnpm build # Running the ncc command
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions |
Full workflow error Run shopify/theme-check-action@v2
with:
theme_root: ./src
flags: --fail-level warning
token: ***
base: main
env:
PNPM_HOME: /root/setup-pnpm/node_modules/.bin
/root/actions-runner/_work/_tool/node/22.15.1/x64/bin/npm install --no-package-lock --no-save @shopify/cli
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @jridgewell/[email protected]
npm warn Found: peer typescript@">=3.7.0" from @rollup/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping/node_modules/@rollup/plugin-typescript
npm warn dev @rollup/plugin-typescript@"11.1.6" from @jridgewell/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping
npm warn
npm warn Could not resolve dependency:
npm warn peer typescript@">=3.7.0" from @rollup/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping/node_modules/@rollup/plugin-typescript
npm warn dev @rollup/plugin-typescript@"11.1.6" from @jridgewell/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @jridgewell/[email protected]
npm warn Found: peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping/node_modules/@typescript-eslint/eslint-plugin
npm warn dev @typescript-eslint/eslint-plugin@"6.18.1" from @jridgewell/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping
npm warn
npm warn Could not resolve dependency:
npm warn peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping/node_modules/@typescript-eslint/eslint-plugin
npm warn dev @typescript-eslint/eslint-plugin@"6.18.1" from @jridgewell/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @jridgewell/[email protected]
npm warn Found: peer @typescript-eslint/parser@"^6.0.0 || ^6.0.0-alpha" from @typescript-eslint/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping/node_modules/@typescript-eslint/eslint-plugin
npm warn dev @typescript-eslint/eslint-plugin@"6.18.1" from @jridgewell/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping
npm warn
npm warn Could not resolve dependency:
npm warn peer @typescript-eslint/parser@"^6.0.0 || ^6.0.0-alpha" from @typescript-eslint/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping/node_modules/@typescript-eslint/eslint-plugin
npm warn dev @typescript-eslint/eslint-plugin@"6.18.1" from @jridgewell/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @jridgewell/[email protected]
npm warn Found: peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping/node_modules/@typescript-eslint/parser
npm warn dev @typescript-eslint/parser@"6.18.1" from @jridgewell/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping
npm warn 1 more (@typescript-eslint/eslint-plugin)
npm warn
npm warn Could not resolve dependency:
npm warn peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping/node_modules/@typescript-eslint/parser
npm warn dev @typescript-eslint/parser@"6.18.1" from @jridgewell/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/trace-mapping
npm warn 1 more (@typescript-eslint/eslint-plugin)
npm warn ERESOLVE overriding peer dependency
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @ampproject/[email protected]
npm warn Found: peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@ampproject/remapping/node_modules/@typescript-eslint/eslint-plugin
npm warn dev @typescript-eslint/eslint-plugin@"5.20.0" from @ampproject/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@ampproject/remapping
npm warn
npm warn Could not resolve dependency:
npm warn peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@ampproject/remapping/node_modules/@typescript-eslint/eslint-plugin
npm warn dev @typescript-eslint/eslint-plugin@"5.20.0" from @ampproject/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@ampproject/remapping
npm warn ERESOLVE overriding peer dependency
npm warn ERESOLVE overriding peer dependency
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @jridgewell/[email protected]
npm warn Found: peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/gen-mapping/node_modules/@typescript-eslint/eslint-plugin
npm warn dev @typescript-eslint/eslint-plugin@"5.21.0" from @jridgewell/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/gen-mapping
npm warn
npm warn Could not resolve dependency:
npm warn peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/gen-mapping/node_modules/@typescript-eslint/eslint-plugin
npm warn dev @typescript-eslint/eslint-plugin@"5.21.0" from @jridgewell/[email protected]
npm warn node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/gen-mapping
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: peer svelte@"^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" from [email protected]
npm warn node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/prettier-plugin-tailwindcss/node_modules/prettier-plugin-svelte
npm warn dev prettier-plugin-svelte@"^3.1.2" from [email protected]
npm warn node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/prettier-plugin-tailwindcss
npm warn
npm warn Could not resolve dependency:
npm warn peer svelte@"^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" from [email protected]
npm warn node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/prettier-plugin-tailwindcss/node_modules/prettier-plugin-svelte
npm warn dev prettier-plugin-svelte@"^3.1.2" from [email protected]
npm warn node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/prettier-plugin-tailwindcss
npm error Cannot read properties of null (reading 'matches')
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-06-24T11_13_38_759Z-debug-0.log
Error: The process '/root/actions-runner/_work/_tool/node/22.15.1/x64/bin/npm' failed with exit code 1
at ExecState._setResult (/root/actions-runner/_work/_actions/shopify/theme-check-action/v2/dist/index.js:1:24684)
at ExecState.CheckComplete (/root/actions-runner/_work/_actions/shopify/theme-check-action/v2/dist/index.js:1:24244)
at ChildProcess.<anonymous> (/root/actions-runner/_work/_actions/shopify/theme-check-action/v2/dist/index.js:1:23085)
at ChildProcess.emit (node:events:524:28)
at maybeClose (node:internal/child_process:1104:16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
Error: The process '/root/actions-runner/_work/_tool/node/22.15.1/x64/bin/npm' failed with exit code 1 |
|
What the hell so it's the npm install that is causing issue? This is weird because we're running this in both Horizon and Dawn and the CI is green... Wondering if it has to do with some kind of conflict with a package.json that y'all have? Maybe I need more flags? Something like don't install dev deps of CLI or somethign? Probably why it complains about svelte peer dependencies? Hard to fix this if I can't reproduce. Can you try adding a step in your CI jobs that remove the package.json before running this command? |
It works as expected when removing the |
|
I think this is related to If I just install Should we give #42 a go again? |

annotation.pathis relative to GitHub, and not the--pathvalue...ctx.repo