The GitHub GraphQL API does not seem to be consistent on which commit is the first returned. The order should be similar to what git log would return for the repository and there are some edge cases where a commit's data could have changed in a way where an older date commit is the first returned. This PR changes the query to look at the first 10 commits returned and find the latest date out of those. 10 is an arbitrary number but I didn't want the batch to be too big that it consumes more rate limit and the cases where I have found this to be a problem generally have the latest commit as the 2nd in the list returned from the query.
The GitHub GraphQL API does not seem to be consistent on which commit is the first returned. The order should be similar to what
git log
would return for the repository and there are some edge cases where a commit's data could have changed in a way where an older date commit is the first returned. This PR changes the query to look at the first 10 commits returned and find the latest date out of those. 10 is an arbitrary number but I didn't want the batch to be too big that it consumes more rate limit and the cases where I have found this to be a problem generally have the latest commit as the 2nd in the list returned from the query.An example from https://github.com/dkubb/axiom-types/commits/master/
Query returns: