def edit_issue(auth_token, username, repo, issue_number, issue_title, issue_body, insecure=False):
"""
Edit an issue.
"""
# https://developer.github.com/v3/issues/#edit-an-issue
# Parameters (not required):
# title - String containing the title of the issue.
# body - String containing the body of the issue.
parameters = {"title": issue_title, "body": issue_body}
try:
response = requests.patch("https://api.github.com/repos/{}/issues/{}".format(repo, issue_number),
json=parameters,
headers=auth_header(auth_token))
except requests.SSLError:
print("A network error occurred.")
if insecure:
print("An SSL certificate error occurred.")
return response.json()
评论列表
文章目录