Exemplo n.º 1
0
    def _execute(self, options, args):
        user_email = gitshelve.git('config', 'user.email')

        if options.all:
            rules = [{'assigned_to': user_email}]

        else:
            rules = [{'assigned_to': user_email},
                     {'status__not': 'closed'},
                     {'status__not': 'invalid'}
                     ]

        issues = common.issue_manager.filter(rules=rules,
                                                operator="and",
                                                sort_key=options.sort
                                                )
        common.print_issues(issues)
Exemplo n.º 2
0
    def _execute(self, options, args):
        user_email = gitshelve.git('config', 'user.email')

        if options.all:
            rules = [{'assigned_to': user_email}]

        else:
            rules = [{
                'assigned_to': user_email
            }, {
                'status__not': 'closed'
            }, {
                'status__not': 'invalid'
            }]

        issues = common.issue_manager.filter(rules=rules,
                                             operator="and",
                                             sort_key=options.sort)
        common.print_issues(issues)
Exemplo n.º 3
0
    def _execute(self, options, args):
        if options.all:
            filters = []

        else:
            # default filters, to filter out invalid and closed issues
            filters = [{'status__not': 'closed'}, {'status__not': 'invalid'}]

        if options.filter:
            for fltr in options.filter.split(","):
                try:
                    key, value = fltr.split(':')

                except ValueError:
                    # filter parameters in worng format
                    print "Wrong filter argument:", fltr
                    return

                filters.append({key: value})

        common.print_issues(
            common.issue_manager.filter(sort_key=options.sort, rules=filters))
Exemplo n.º 4
0
    def _execute(self, options, args):
        if options.all:
            filters = []

        else:
            # default filters, to filter out invalid and closed issues
            filters = [{'status__not':'closed'}, {'status__not':'invalid'}]

        if options.filter:
            for fltr in options.filter.split(","):
                try:
                    key, value = fltr.split(':')

                except ValueError:
                    # filter parameters in worng format
                    print "Wrong filter argument:", fltr
                    return

                filters.append({key:value})

        common.print_issues(common.issue_manager.filter(sort_key=options.sort,
                                                        rules=filters)
                            )