def create_pull_request(repo, branch_name, base=None, title=None):
    """Creates a pull request for the given branch"""
    base = base or 'master'
    title = title or 'Auto-Generated Pull Request'
    pull_request = repo.create_pull(title, base, branch_name)
    return pull_request
