jdennes/contribution-checker — pull request #1 by jdennes (2014-06-08 20:19:55+00:00)
Title: Optimise checking done in ContributionChecker::Checker#user_has_fork_of_repo?

Optimises the checking done in `ContributionChecker::Checker#user_has_fork_of_repo?`, to avoid expensive API calls where possible.

- First, if there are no forks, return `false`.
- Second, determine whether we can potentially figure out whether the user has a fork in a single API call: get all forks if there are less than equal to 100 (the first page, where the page size is set to the maximum of 100).
- Third, try to find a user's repository with the same full name (nwo) as the repository in which the commit exists.
- Then continue on to getting all the user's forks, and checking the parent of each fork until we potentially find one.