Skip to content

Fix the "the diff exceeded the maximum number of files (300)" Error #51

@Bue-von-hon

Description

@Bue-von-hon

I encountered the following error.
It seems that when using the 'List pull requests files' API, it is possible to request more than 300 files.
I would appreciate it if this could be improved. 👍

Run python /home/runner/work/_actions/truongnh1992/gemini-ai-code-reviewer/main/review_code_gemini.py
Attempting to get diff for: my-project PR#4109
Failed to get diff. Status code: 406
Response content: {"message":"Sorry, the diff exceeded the maximum number of files (300). Consider using 'List pull requests files' API or locally cloning the repository instead.","errors":[{"resource":"PullRequest","field":"diff","code":"too_large"}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#list-pull-requests-files","status":"406"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions