Skip to content

feature request: commit list rest endpoint #752

@braxton-dameron

Description

@braxton-dameron

We use this action on pull_request and push, but we've noticed a small discrepancy after merging a couple of our branches. Our PRs that have more than 20 commits do not lint every commit. I've realized this is because of a limit on the push webhook payload.

commits array of objects Required
An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the compare between the before commit and the after commit.) The array includes a maximum of 20 commits. If necessary, you can use the Commits API to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries.

https://docs.github.com/en/webhooks/webhook-events-and-payloads#push

Is there interest in supporting the REST endpoint to enable consistent linting on large PRs using something like octokit.rest.repos.listCommits(...)? It's atypical for my team to have large PRs like this, but with very active repos and merges it may become more frequent.

https://docs.github.com/en/free-pro-team@latest/rest/commits/commits?apiVersion=2022-11-28#list-commits
https://octokit.github.io/rest.js/v20#repos

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