import requests


def get_files_from_pr(pr_num):
    """Return a list of changed files from a GitHub Pull Request

    Arguments:
        pr_num {str} -- Pull Request number to get modified files from

    Returns:
        {list} -- List of modified filenames
    """
    files = []
    pr_url = f"https://api.github.com/repos/bids-standard/bids-specification/pulls/{pr_num}/files"
    resp = requests.get(pr_url)

    for item in resp.json():
        files.append(item["filename"])

    return files