def _execute(self, option, args): # find issue try: issue_id = args[0] except IndexError: self._help() return issue = common.issue_manager.get(issue_id) if not common.verify("Delete issue '%s' (y)? " % issue.get_property('title'), default='y'): print " >", "Delete canceled" return issue.delete() # commit common.git_repo.commit("Deleted issue %s" % issue.get_property('id')) print "Deleted issue: %s" % issue.get_property('id')
def _execute(self, option, args): # find issue try: issue_id = args[0] except IndexError: self._help() return issue = common.issue_manager.get(issue_id) if not common.verify( "Delete issue '%s' (y)? " % issue.get_property('title'), default='y'): print " >", "Delete canceled" return issue.delete() # commit common.git_repo.commit("Deleted issue %s" % issue.get_property('id')) print "Deleted issue: %s" % issue.get_property('id')
def _execute(self, options, args): from gitissius.database import Issue try: title = args[0] issue = Issue(title=title) except IndexError: issue = Issue() # edit issue.interactive_edit() if not common.verify("Create issue (y)? ", default='y'): print " >", "Issue discarded" return # add to repo common.git_repo[issue.path] = issue.serialize(indent=4) # commit common.git_repo.commit("Added issue %s" % issue.get_property('id')) print "Created issue: %s" % issue.get_property('id')
def _execute(self, options, args): # find issue try: issue_id = args[0] except IndexError: self._help() issue = common.issue_manager.get(issue_id) # edit issue.interactive_edit() if not common.verify("Edit issue (y)? ", default='y'): print " >", "Issue discarded" return # add to repo common.git_repo[issue.path] = issue.serialize(indent=4) # commit common.git_repo.commit("Edited issue %s" % issue.get_property('id')) print "Edited issue: %s" % issue.get_property('id')