• Rémy Coutable's avatar
    Retrieve PR comments only when we know there are any · e484a064
    Rémy Coutable authored
    The Pull Request resource doesn't include the `comments` field, while
    the Issue resource does. And since we're looping through all issues
    anyway, we can freely check if the issue is a PR and has comments and in
    this case only fetch comments for it.
    
    That means if you have 1000 PRs but only 200 with comments, you will do
    200 API requests instead of 1000. :notbad:
    Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
    e484a064
import.rb 12.7 KB