def _create_issue(self):
        # create issue on the server
        uri = "repos/%s/issues" % self.repo
        url = github.url(uri)
        data = utils.clean_data(copy.deepcopy(self.data), ["state"])
        if not data or len(data.keys()) == 0:
            utils.log("New issues require title/body")
            return
        data, status = github.request(url, "post", data)
        if not status:
            utils.log(data)
            return 

        # update attributes as needed for object
        self.number = str(data["number"])
        self.data["user"] = data["user"]["login"]
        self.url = data["html_url"]
        self.issue_uri = "repos/%s/issues/%s" % (self.repo, self.number)
        self.comments.number = self.number

        # clean up hash
        del i_hash["%s/%s" % (self.repo, "new")]
        i_hash["%s/%s" % (self.repo, self.number)] = self

        # delete the old buffer that we don't need any more
        vim.command("silent new")
        vim.command("bdelete %s" % self.buffer_name)
dataset/ETHPy150Open jonmorehouse/vimhub/lib/issue.py/Issue._create_issue/original