Add pagination to commit fetching
Created by: sanderginn
The deployment lag notifier is failing after increasing the amount of commits allowed to be behind, because the commit API is paginated and allows max 100 results per page. This PR adds pagination support.
Test plan
Local dry run, first line shows fetched commits:
2022/07/28 15:19:00 numCommits: 150, fetched commits: 150
2022/07/28 15:19:00 Cloud is not current!
:warning: *cloud*'s version may be out of date.
Current version: `e397ff284928` was committed *14h32m16s hours ago*.
*Alerts*:
Check <https://github.com/sourcegraph/deploy-sourcegraph-cloud/pulls|deploy-sourcegraph-cloud> to see if a release is blocked.
cc <!subteam^S02J9TTQLBU|dev-experience-support>
2022/07/28 15:19:00 Now: 2022-07-28 15:19:00.825213 +0200 CEST m=+1.099375043
2022/07/28 15:19:00 cloud: 2022-07-27 22:46:44 +0000 UTC
2022/07/28 15:19:00 main: 2022-07-28 12:59:21 +0000 UTC
Process finished with the exit code 0