Esempio n. 1
0
    def __init__(self, issues, begin, end):
        if isinstance(begin, datetime):
            issues = [
                issue for issue in issues
                if issue.closed_at and issue.closed_at >= begin
            ]
        if isinstance(end, datetime):
            issues = [issue for issue in issues if issue.created_at <= end]

        data = [[
            extract_org(issue.html_url),
            extract_repo(issue.html_url),
            int(issue.number), issue.user.login, issue.title, issue.body,
            ','.join([l.name for l in issue.labels if l.name is not None]),
            ','.join([a.name for a in issue.assignees if a.name is not None]),
            issue.pull_request is not None, issue.created_at, issue.closed_at
        ] for issue in issues]

        self.items = issues
        self.issues = df(data,
                         columns=[
                             'org', 'repo', 'number', 'user', 'title', 'body',
                             'labels', 'assignees', 'is_pr', 'created_at',
                             'closed_at'
                         ])
    def __init__(self, issue, comments):
        data = [[extract_org(issue.html_url), extract_repo(issue.html_url), int(issue.number), comment.user.login,
                 comment.body, comment.updated_at
                 ] for comment in comments]

        self.items = comments
        self.issue_comments = df(data, columns=['org', 'repo', 'number', 'user', 'comment',
                                                'updated_at'])
Esempio n. 3
0
    def __init__(self, pull, comments, end):
        if isinstance(end, datetime):
            comments = [comment for comment in comments if comment.created_at <= end]

        data = [[extract_org(pull.html_url), extract_repo(pull.html_url), int(pull.number), comment.user.login,
                 comment.body, comment.updated_at, comment.commit_id, comment.path
                 ] for comment in comments]

        self.items = comments
        self.review_comments = df(data, columns=['org', 'repo', 'number', 'user', 'comment',
                                                 'updated_at', 'commit_id', 'path'])
Esempio n. 4
0
    def __init__(self, pulls, begin, end):
        if isinstance(begin, datetime):
            pulls = [pull for pull in pulls if pull.closed_at and pull.closed_at >= begin]
        if isinstance(end, datetime):
            pulls = [pull for pull in pulls if pull.created_at <= end]

        data = [[extract_org(pull.html_url), extract_repo(pull.html_url), int(pull.number), pull.user.login,
                 pull.title, pull.body, ','.join([l.name for l in pull.labels if l.name is not None]),
                 int(pull.additions), int(pull.deletions), pull.merged, pull.closed_at, pull.diff_url] for pull in
                pulls]

        self.items = pulls
        self.pulls = df(data, columns=['org', 'repo', 'number', 'user', 'title', 'body', 'labels'
            , 'additions', 'deletions', 'is_merged', 'closed_at', 'diff_url'])
Esempio n. 5
0
    def __init__(self, repos, begin, end):
        if isinstance(begin, datetime):
            repos = [repo for repo in repos if repo.updated_at >= begin]
        if isinstance(end, datetime):
            repos = [repo for repo in repos if repo.created_at <= end]
        data = [[
            extract_org(repo.html_url),
            extract_repo(repo.html_url),
            repo.language,
            repo.created_at,
        ] for repo in repos]

        self.items = repos
        self.repos = df(data,
                        columns=['org', 'repo', 'language', 'created_at'])