8000 Action fails above a certain number of commits · Issue #7 · tim-actions/commit-message-checker-with-regex · GitHub
[go: up one dir, main page]

Skip to content

Action fails above a certain number of commits #7

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

Open
endreymarcell-wise opened this issue Aug 3, 2022 · 3 comments
Open

Action fails above a certain number of commits #7

endreymarcell-wise opened this issue Aug 3, 2022 · 3 comments

Comments

@endreymarcell-wise
Copy link

I'm running this action on pull requests, right after grabbing the commits themselves using the get-pr-commits action. However, after reaching a certain number of commits (around 30), the action starts failing due to the excessive number of arguments:

Run tim-actions/commit-message-checker-with-regex@v0.3.1
Error: An error occurred trying to start process '/home/runner/runners/2.294.0/externals/node12/bin/node' with working directory '/home/runner/work/my-repo/my-repo'. Argument list too long

I'll be the first to admit that we should have smaller PRs... but at the same time, I'd expect the job not to fail. Maybe we can add an option to read the commit messages from a file rather than stdin?

@gesellix
Copy link

We're trying to work around that issue by transforming the get-pr-commits output like this:

      - name: Reduce commit data
        run: >
          echo '${{ steps.get-pr-commits.outputs.commits }}' | jq --monochrome-output --compact-output '[.[] | {"sha": .sha, "commit":{ "message": .commit.message }}]' > filtered-commits.json
      - name: Load filtered commit data in output
        id: 'get-pr-commit-messages'
        run: >
          echo "commit-messages=$(cat filtered-commits.json)" >> $GITHUB_OUTPUT

@gesellix
Copy link
gesellix commented Dec 5, 2022

We're now using a combined github action (get-pr-commits + commit-message-checker-with-regex) in the fork at https://github.com/gesellix/commit-message-checker-with-regex.

@sejust
Copy link
sejust commented May 20, 2025

1、list all commits by page,output to a file. https://github.com/sejust/get-pr-commits
2、load json commits from file. https://github.com/sejust/commit-message-checker-with-regex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0