def run(self):
issue_post = get_issue_post(self.view)
log("preparing posting issue " + str(issue_post[
'issue']))
post_result = self.issue_list.post_issue(
data=json.dumps(issue_post['issue']))
if post_result.status_code in (200, 201):
issue = post_result.json()
if len(issue_post['label']) != 0:
self.issue_list.attach_labels(issue['number'],
issue_post['label'])
repo_info = (self.issue_list.username, self.issue_list.repo_name,
None)
self.view.settings().set("new_issue", False)
print_issue_in_view = PrintIssueInView(
self.issue_list, issue['number'], self.issue_storage,
repo_info, repo_info_storage, self.view)
print_issue_in_view.start()
else:
sublime.status_message(
"Issue not Posted, error code {} please try again.".format(
str(post_result.status_code)))
评论列表
文章目录