issue.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:gissues 作者: divinites 项目源码 文件源码
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)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号