def get_touched_pullrequest_files(payload, github_auth):
    if payload['action'] == 'closed':
        return set()
    
    base_sha = payload['pull_request']['base']['sha']
    head_sha = payload['pull_request']['head']['sha']

    compare_url = payload['pull_request']['head']['repo']['compare_url']
    compare_url = expand_uri(compare_url, dict(head=head_sha, base=base_sha))
    current_app.logger.debug('Compare URL {}'.format(compare_url))
    
    compare = get(compare_url, auth=github_auth).json()
    touched = set([file['filename'] for file in compare['files']])
    current_app.logger.debug(u'Touched files {}'.format(', '.join(touched)))
    
    return touched
Return a set of files modified between master and payload head.
dataset/ETHPy150Open openaddresses/machine/openaddr/ci/__init__.py/get_touched_pullrequest_files