[api] Use correct query method to iterate over issues

Without this, delayed jobs would fail with:
"IssueTracker#update_package_metadata failed with NoMethodError: undefined method `each' for #<Class:0x00000003d0a7c0>..."