github-pr-contains-action icon indicating copy to clipboard operation
github-pr-contains-action copied to clipboard

github-pr-contains-action fails on big diffs?

Open Cellcote opened this issue 2 years ago • 5 comments

We have been using this github action for a while and seems to be working fine for us with no real problems. Now I tried doing a refactor on the whole code base (~500 files touched, 34k lines of code), and the whole github action just does not work. The error we get is this:

Checking body contents
Checking diff contents
Getting diff for: <org>, <repo>, <pr number>
Error: ❌ There seems to be an error in an API request
This is usually due to using a GitHub token without the adequate scope

In other PRs, it works just fine, and also retries did not help.

Our config is like this:

steps:
      - uses: JJ/github-pr-contains-action@releases/v12.1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          bodyDoesNotContain: "escribe the *\\*_what_\\*\\* and \\*\\*_why_\\*\\* of the change"

so ideally it should only scan the body (nothing crazy there) and skip scanning the diff if the config only specifies restrictions on the body of the PR.

Cellcote avatar Apr 19 '24 15:04 Cellcote

Definitely needs a revision. Thanks for the report!

JJ avatar Apr 19 '24 17:04 JJ