Skip to content

Incorrect count on push #2

Description

@lundman
Your branch is ahead of 'origin/development' by 383 commits.
# git push

**** zfs-consus [~zfs-consu@52.234.38.171] has joined #openzfs-windows
<zfs-consus> [openzfs] lundman pushed 20 commits to development

and chatgpt says on the matter:

Yes, the GitHub API does cap the number of commits it returns in the payload for certain events. Specifically:

For the push event, the GitHub API includes up to 20 commits in the commits[] array within the event payload.
If more than 20 commits are pushed, the commits array will still only contain 20 entries, but there will be additional information in the payload indicating the total number of commits pushed.
Finding the Total Number of Commits
The total number of commits is available in the push event payload under the key size. For example:

commit_count = event_data.get("size", 0)  # Total number of commits pushed
commits = event_data.get("commits", [])  # Up to 20 commits listed

Fix this next time you are bored lundman.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions