Fix an edge case in get_pr_list_from_usernames.
When invoked with an empty username list, the function would construct the Github API query as is:open is:pr repo:edx/edx-platform
, which returns all PRs from the requested fork, instead of no PRs.
Testing instructions:
- Without this patch, start the django shell. Invoke
pr_watch.github.get_pr_list_from_usernames([], 'edx/edx-platform')
and observe it fetches a page of all PRs from the Github API. - Install the patch & restart the shell.
- Invoke the function again, verify it returns an empty list.
Reviewers:
- @pomegranited