Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_diff(user, proj, sha1, sha2, auth=None):
"""Get the diff between two hashes for a project."""
auth = get_API_token(auth)
auth = colon_seperated_pair(auth)
url = 'http://api.github.com/repos/{user}/{proj}/compare/{sha1}...{sha2}'
url = url.format(user=user, proj=proj, sha1=sha1, sha2=sha2)
resp = requests.get(url, auth=auth)
return resp