perceval/backends/core/github.py
def __fetch_issues(self, from_date, to_date):
        """Fetch the issues"""

        issues_groups = self.client.issues(from_date=from_date)

        for raw_issues in issues_groups:
            issues = json.loads(raw_issues)
            for issue in issues:

                if str_to_datetime(issue['updated_at']) > to_date:
                    return

                self.__init_extra_issue_fields(issue)
                for field in TARGET_ISSUE_FIELDS:

                    if not issue[field]:
                        continue

                    if field == 'user':
                        issue[field + '_data'] = self.__get_user(issue[field]['login'])
                    elif field == 'assignee':
                        issue[field + '_data'] = self.__get_issue_assignee(issue[field])
                    elif field == 'assignees':
                        issue[field + '_data'] = self.__get_issue_assignees(issue[field])
                    elif field == 'comments':
                        issue[field + '_data'] = self.__get_issue_comments(issue['number'])
                    elif field == 'reactions':
                        issue[field + '_data'] = \
                            self.__get_issue_reactions(issue['number'], issue['reactions']['total_count'])

                yield issue
def __fetch_issues(self, from_date, to_date):
        """Fetch the issues"""

        issues_groups = self.client.issues(from_date=from_date)

        for raw_issues in issues_groups:
            issues = json.loads(raw_issues)
            for issue in issues:

                if str_to_datetime(issue['updated_at']) > to_date:
                    return

                self.__init_extra_issue_fields(issue)
                for field in TARGET_ISSUE_FIELDS:

                    if not issue[field]:
                        continue

                    if field == 'user':
                        issue[field + '_data'] = self.__get_user(issue[field]['login'])
                    elif field == 'assignee':
                        issue[field + '_data'] = self.__get_issue_assignee(issue[field])
                    elif field == 'assignees':
                        issue[field + '_data'] = self.__get_issue_assignees(issue[field])
                    elif field == 'comments':
                        issue[field + '_data'] = self.__get_issue_comments(issue['number'])
                    elif field == 'reactions':
                        issue[field + '_data'] = \
                            self.__get_issue_reactions(issue['number'], issue['reactions']['total_count'])

                yield issue
def __fetch_issues ( self , from_date , to_date ) : issues_groups = self . client . issues ( from_date = from_date ) for raw_issues in issues_groups : issues = json . loads ( raw_issues ) for issue in issues : if str_to_datetime ( issue [ 'updated_at' ] ) > to_date : return self . __init_extra_issue_fields ( issue ) for field in TARGET_ISSUE_FIELDS : if not issue [ field ] : continue if field == 'user' : issue [ field + '_data' ] = self . __get_user ( issue [ field ] [ 'login' ] ) elif field == 'assignee' : issue [ field + '_data' ] = self . __get_issue_assignee ( issue [ field ] ) elif field == 'assignees' : issue [ field + '_data' ] = self . __get_issue_assignees ( issue [ field ] ) elif field == 'comments' : issue [ field + '_data' ] = self . __get_issue_comments ( issue [ 'number' ] ) elif field == 'reactions' : issue [ field + '_data' ] = self . __get_issue_reactions ( issue [ 'number' ] , issue [ 'reactions' ] [ 'total_count' ] ) yield issue
Fetch the issues
Fetch the issues