def get_pull_requests_by_head(repo, branch_name):
    """Returns all pull requests with head equal to the given branch name."""
    if branch_name == repo.default_branch:
        return None
    return list(repo.pull_requests(head=repo.owner.login + ':' + branch_name))
