From e9681cd5a6abb616d075af4558dc44e1943b991d Mon Sep 17 00:00:00 2001 From: Mariatta Date: Fri, 8 Sep 2017 21:18:34 -0700 Subject: [PATCH] Use html_url field instead of url (GH-17) The `html_url` field takes us to the actual comment on GitHub. `url` field took us to an API JSON response. --- backport/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backport/util.py b/backport/util.py index c09e2dcd19a9b9f..cc11262c3f16085 100644 --- a/backport/util.py +++ b/backport/util.py @@ -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) @@ -36,4 +36,4 @@ def is_cpython_repo(): subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT) except subprocess.SubprocessError: return False - return True \ No newline at end of file + return True