def edit_issue_comment(auth_token, username, repo, comment_id, comment_body, insecure=False):
"""
Edits an existing comment on a specified issue.
"""
# https://developer.github.com/v3/issues/comments/#edit-a-comment
# Note: Issue Comments are ordered by ascending ID.
# Parameters:
# body - Reqired string. The contents of the comment.
parameters = {"body": comment_body}
try:
response = requests.patch("https://api.github.com/repos/{}/issues/comments/{}".format(repo, comment_id),
json=parameters,
headers=auth_header(auth_token))
except:
print("A network error occurred.")
if insecure:
print("An SSL certificate error occurred.")
return response.json()
评论列表
文章目录