DESCRIPTION:
In github-events.rb's earliest() function (lines 112-120), the loop does:
while commits.size != 1
commits = Fbe.octo.commits(repo, sha: last[:sha])
last = commits.last
end
For a repo with a very long commit history (e.g. 100k+ commits), this fetches older pages of commits one at a time, potentially forever if commits always has size > 1 (e.g. >100 commits always returned). Each iteration consumes API quota. Also, if commits.last is nil (empty response edge case), last[:sha] raises NoMethodError.
REPRODUCTION:
- Process a repo with very long commit history.
- Watch the API quota burn; or
- Process an empty repo (commits is []); nil[:sha] raises.
IMPACT:
API quota exhaustion (GitHub secondary rate limit); or crash.
RELATED FILES:
judges/github-events/github-events.rb
DESCRIPTION:
In github-events.rb's
earliest()function (lines 112-120), the loop does:For a repo with a very long commit history (e.g. 100k+ commits), this fetches older pages of commits one at a time, potentially forever if
commitsalways has size > 1 (e.g. >100 commits always returned). Each iteration consumes API quota. Also, ifcommits.lastis nil (empty response edge case),last[:sha]raises NoMethodError.REPRODUCTION:
IMPACT:
API quota exhaustion (GitHub secondary rate limit); or crash.
RELATED FILES:
judges/github-events/github-events.rb