File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 36
36
if kind == "issues" :
37
37
url = f"https://api.github.com/repos/{ repo_owner } /issues/{ number } "
38
38
issue_data = get_session ().get (url ).json ()
39
+ html_url = issue_data ["html_url" ]
39
40
if issue_data ["state" ] == "closed" :
40
41
do_comment = True
41
42
else :
42
43
print (f"Still open, comment manually: { url } " )
43
44
else :
44
45
url = f"https://api.github.com/repos/{ repo_owner } /pulls/{ number } "
45
46
pull_data = get_session ().get (url ).json ()
47
+ html_url = pull_data ["html_url" ]
46
48
if pull_data ["state" ] == "closed" :
47
49
if pull_data ["merged" ]:
48
50
do_comment = True
49
51
else :
50
- print (f"Not merged, comment manually: { url } " )
52
+ print (f"Not merged, comment manually: { html_url } " )
51
53
else :
52
- print (f"Still open, comment manually: { url } " )
54
+ print (f"Still open, comment manually: { html_url } " )
53
55
54
56
if do_comment :
55
- print (f"Commenting on { url } " )
57
+ print (f"Commenting on { html_url } " )
56
58
url = f"https://api.github.com/repos/{ repo_owner } /issues/{ number } /comments"
57
59
resp = get_session ().post (url , json = {"body" : comment })
58
60
print (resp )
You can’t perform that action at this time.
0 commit comments