Skip to content

Octokit Response Only Returns 30 Commits #717

@cmitzel-ncino

Description

@cmitzel-ncino

Hey, it's me again!

The failOnErrors function works awesome - we're able to interact with the results array in another step of the job and make it so that a single passing commit will pass the linter!

However, there is one small issue. By default, Octokit only returns a single page of 30 commits, so the commit history available to the action is only up to the last 30. It's not a dealbreaker, but I doubt it's intended behavior. I attempted to add the per_page: 100, argument to the Octokit call but it broke a number of tests and I'm not sure why, so I figured I'd let you take a look.

I confirmed that is in fact only returning 30 by making a request to the github api for the PR triggering the action, and confirmed that the API (when given the param per_page=100) returned 45 commits, while the results array from the action only returned 30.

Screenshot 2023-04-11 at 4 32 09 PM

Screenshot 2023-04-11 at 4 32 42 PM

Screenshot 2023-04-11 at 4 30 56 PM

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