Skip to content

Commit a13607f

Browse files
committed
build: comment_on_fixes should show html urls
1 parent 0f00d49 commit a13607f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ci/comment_on_fixes.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,25 @@
3636
if kind == "issues":
3737
url = f"https://api.github.com/repos/{repo_owner}/issues/{number}"
3838
issue_data = get_session().get(url).json()
39+
html_url = issue_data["html_url"]
3940
if issue_data["state"] == "closed":
4041
do_comment = True
4142
else:
4243
print(f"Still open, comment manually: {url}")
4344
else:
4445
url = f"https://api.github.com/repos/{repo_owner}/pulls/{number}"
4546
pull_data = get_session().get(url).json()
47+
html_url = pull_data["html_url"]
4648
if pull_data["state"] == "closed":
4749
if pull_data["merged"]:
4850
do_comment = True
4951
else:
50-
print(f"Not merged, comment manually: {url}")
52+
print(f"Not merged, comment manually: {html_url}")
5153
else:
52-
print(f"Still open, comment manually: {url}")
54+
print(f"Still open, comment manually: {html_url}")
5355

5456
if do_comment:
55-
print(f"Commenting on {url}")
57+
print(f"Commenting on {html_url}")
5658
url = f"https://api.github.com/repos/{repo_owner}/issues/{number}/comments"
5759
resp = get_session().post(url, json={"body": comment})
5860
print(resp)

0 commit comments

Comments
 (0)