Closed labanca closed 2 months ago
return { "host": parsed_url['host'], "user": parsed_url['user'], "repo": parsed_url['repo'], "ref": parsed_url['ref'], "sha": response.json()['sha'] }
A chave na qual o SHA fica gravado muda no response dependendo se for branch ou commit, então precisei adaptar a parte final:
return {
"host": parsed_url['host'],
"user": parsed_url['user'],
"repo": parsed_url['repo'],
"ref": parsed_url['ref'],
"sha": response.json()['sha'] if github_endpoint == 'commits' else response.json()['commit']['sha']
}
closes #74