Skip to content

Fix an edge case in get_pr_list_from_usernames.

Matjaz Gregoric requested to merge mtyaka/fix-users-pr-query into master

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:

  1. 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.
  2. Install the patch & restart the shell.
  3. Invoke the function again, verify it returns an empty list.

Reviewers:

  • @pomegranited

Merge request reports