github/hubot-scripts — pull request #1569 by tonymilne (2014-08-25 13:04:04+00:00)
Title: Fix github org-pulls command.

The GitHub org-pulls command `hubot show org-pulls` was not working properly for me; this PR fixes the problem(s) i was experiencing.

The org-pulls command works by first requesting all GitHub organisation issues and then filters them down to ones that are pull requests.

I updated the way issues are filtered; since the GitHub API does not return the pull_request object for non pull request issues, checking `issue.pull_request.html_url == null` would throw an error (trying to read html_url of undefined) for all non pull request issue objects. This updated loop/conditional adds the issue to the filtered_result if the pull_request property exists.

I also restricted the issues API request to return only open issues (for performance gains).