def get_pr_list(script, project_key, repo_slug, state="OPEN", target_branch=None):
    """
    Gets the list of PRs
    :param script: a TestScript instance
    :type script: TestScript
    :param project_key: The project key
    :type project_key: str
    :param repo_slug: The repo slug
    :type repo_slug: str
    :param state: The state filter ("OPEN", "MERGED", "DECLINED", "ALL")
    :type state: str
    :param target_branch: The target branch
    :type target_branch: str
    :return: The page payload
    :rtype: str
    """
    pr_list_url = "/projects/%s/repos/%s/pull-requests" % (project_key, repo_slug)
    query_params = {
        "avatarSize": "64",
        "order": "newest",
        "start": "0",
        "state": state
    }
    if target_branch:
        query_params["at"] = target_branch
    # "role.1": "AUTHOR/REVIEWER",
    # "username.1": "admin",
    return script.http("GET", pr_list_url, query_params)