Skip to content

Commit

Permalink
Use html_url field instead of url (GH-17)
Browse files Browse the repository at this point in the history
The `html_url` field takes us to the actual comment on GitHub.
`url` field took us to an API JSON response.
  • Loading branch information
Mariatta authored Sep 9, 2017
1 parent d96e3c1 commit e9681cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backport/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def comment_on_pr(issue_number, message):
headers=request_headers,
json=data)
if response.status_code == requests.codes.created:
print(f"Commented at {response.json()['url']}")
print(f"Commented at {response.json()['html_url']}")
else:
print(response.status_code)
print(response.text)
Expand All @@ -36,4 +36,4 @@ def is_cpython_repo():
subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
except subprocess.SubprocessError:
return False
return True
return True

0 comments on commit e9681cd

Please sign in to comment.