예제 #1
0
    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')
예제 #2
0
    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')
예제 #3
0
    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')
예제 #4
0
    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')
예제 #5
0
    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')
예제 #6
0
    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')