Shopify / theme-check-action

Run shopify/theme-check on GitHub pull requests
Other
38 stars 14 forks source link

Action fails with: Error: Invalid request. No more than 50 items are allowed; 404 were supplied. #6

Closed vfonic closed 2 years ago

vfonic commented 2 years ago

tl;dr This PR fixes this issue #7

I'm trying to setup theme-check gh action for the first time.

Here's the .github/workflows/theme-check.yml that I added to my repo:

name: Theme Check
on: [push]
jobs:
  theme-check:
    name: Theme Check
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Theme Check
        uses: shopify/theme-check-action@v1
        with:
          theme_root: '.'
          token: ${{ github.token }}

Here's the error:

Run shopify/theme-check-action@v1
  with:
    theme_root: .
    token: ***
/usr/bin/docker run --name xxxxxxx --label xxxxxxx --workdir /github/workspace --rm -e INPUT_THEME_ROOT -e INPUT_TOKEN -e INPUT_FLAGS -e INPUT_VERSION -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/xxxxx/xxxxx":"/github/workspace" xxxxx:xxxxxxxxxx
Successfully installed ast-2.4.2
Successfully installed parser-3.1.1.0
Successfully installed liquid-5.1.0
Successfully installed theme-check-1.10.1
4 gems installed
theme-check --version
1.10.1
theme-check -o json . > /tmp/results.json
Checking . ...
NODE_PATH=/var/task/node_modules node /index.js
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
Creating GitHub check...
Converting results.json into annotations...
Updating GitHub check...
HttpError: Invalid request.
Error: Invalid request.

No more than 50 items are allowed; 404 were supplied.

No more than 50 items are allowed; 404 were supplied.
    at /var/task/node_modules/@octokit/request/dist-node/index.js:86:21
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async /index.js:63:5
vfonic commented 2 years ago

I tried this in three gh repos containing three completely different themes:

I tried:

In all of these situations, Theme Check job fails and Theme Check Report hangs (never finishes).