Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect count on push #2

Open
lundman opened this issue Jan 26, 2025 · 0 comments
Open

Incorrect count on push #2

lundman opened this issue Jan 26, 2025 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@lundman
Copy link

lundman commented Jan 26, 2025

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.

@lundman lundman added enhancement New feature or request good first issue Good for newcomers labels Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant