From 12903423a247ba40061e89bf9472c7f91cce528e Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Sep 26 2016 17:31:11 +0000 Subject: Fixed review comments --- diff --git a/pagure_importer/utils/__init__.py b/pagure_importer/utils/__init__.py index 1fd1718..585895b 100644 --- a/pagure_importer/utils/__init__.py +++ b/pagure_importer/utils/__init__.py @@ -84,7 +84,8 @@ def generate_json_for_github_contributors(github_username, contributor_fullname = contributor['name'] contributor_name = data['committer']['login'] except TypeError: - click.echo('Maybe one of the contributors is dropped because of lack of details') + click.echo('Maybe one of the contributors is dropped because\ + of lack of details') continue json_data = { @@ -100,7 +101,7 @@ def generate_json_for_github_contributors(github_username, break if not present: - click.echo('contributor added: ', contributor_name) + click.echo('contributor added: ' + contributor_name) contributors.append(json_data) with open('contributors.json', 'w') as f: @@ -137,7 +138,8 @@ def generate_json_for_github_issue_commentors(github_username, try: commentor = data['user']['login'] except TypeError: - click.echo('Maybe one of the issue commentors have been dropped because of lack of details') + click.echo('Maybe one of the issue commentors have been\ + dropped because of lack of details') continue present = False @@ -147,7 +149,7 @@ def generate_json_for_github_issue_commentors(github_username, break if not present: - click.echo('commentor added: ', commentor) + click.echo('commentor added: ' + commentor) issue_commentors.append(commentor) with open('issue_commentors.json', 'w') as f: diff --git a/pagure_importer/utils/importer_github.py b/pagure_importer/utils/importer_github.py index 80e7758..d699166 100644 --- a/pagure_importer/utils/importer_github.py +++ b/pagure_importer/utils/importer_github.py @@ -98,7 +98,7 @@ class GithubImporter(): pagure_issue_comment_editor = None # comment updated at - pagure_issue_comment_edited_on = comment.updated_at + pagure_issue_comment_edited_on = comment.updated_at.strftime('%s') # The User who commented pagure_issue_comment_user = models.User( @@ -115,7 +115,8 @@ class GithubImporter(): date_created=pagure_issue_comment_created_at, user=pagure_issue_comment_user.to_json(), edited_on=pagure_issue_comment_edited_on, - editor=pagure_issue_comment_editor) + editor=pagure_issue_comment_editor, + attachment=None) comments.append(pagure_issue_comment.to_json())