fix: fix math with timeline and commit counts of a PR #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From our Enterprise Server at 3.4.2, we found cases where a pull request has
more than 250 commits. It seems like the timeline count doesn't incorporate the
full commit count, so the subtraction of commit count from the timeline count
would result in a negative total record count.
This commit changes the math of the issue event count so that only 250 commits
are subtracted from the timeline count if the commit count is greater than 250.
This logic and behavior of the timeline GraphQL property needs to be confirmed
by a GitHub engineer.
NOTE: Similar changes may need to be made with respect to the comment count of
a pull request as well. I just haven't found a use case to test it myself.
I'm leaving this in a draft state at the moment, because I'm not sure if this
accurate or not. @admiralAwkbar - this is what I emailed you about and a
potential fix.