From 69e864970187886735ff716b2f7d8583c8c1b631 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 1/13] Remove dependency to pagure code Signed-off-by: Clement Verna --- diff --git a/pagure_importer/utils/git.py b/pagure_importer/utils/git.py index fafbf06..cf4f388 100644 --- a/pagure_importer/utils/git.py +++ b/pagure_importer/utils/git.py @@ -11,8 +11,6 @@ import json import hashlib import werkzeug -from repo import PagureRepo - def get_secure_filename(attachment, filename): ''' Hashes the file name, same as pagure ''' @@ -47,7 +45,7 @@ def push_delete_repo(newpath, new_repo): master_ref = new_repo.lookup_reference('HEAD').resolve() refname = '%s:%s' % (master_ref.name, master_ref.name) - PagureRepo.push(ori_remote, refname) + ori_remote.push([refname]) # Remove the clone shutil.rmtree(newpath) diff --git a/pagure_importer/utils/repo.py b/pagure_importer/utils/repo.py deleted file mode 100644 index f46b31a..0000000 --- a/pagure_importer/utils/repo.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- - -''' Code taken from https://pagure.io/pagure/blob/master/f/pagure/lib/repo.py - by pingou@pingoured.fr -''' - - -import pygit2 -import sys - - -def get_pygit2_version(): - ''' Return pygit2 version as a tuple of integers. - This is needed for correct version comparison. - ''' - return tuple([int(i) for i in pygit2.__version__.split('.')]) - - -class PagureRepo(pygit2.Repository): - """ An utility class allowing to go around pygit2's inability to be - stable. - - """ - - @staticmethod - def push(remote, refname): - """ Push the given reference to the specified remote. """ - pygit2_version = get_pygit2_version() - if pygit2_version >= (0, 22): - remote.push([refname]) - else: - remote.push(refname) - - def pull(self, remote_name='origin', branch='master', force=False): - ''' pull changes for the specified remote (defaults to origin). - - Code from MichaelBoselowitz at: - https://github.com/MichaelBoselowitz/pygit2-examples/blob/ - 68e889e50a592d30ab4105a2e7b9f28fac7324c8/examples.py#L58 - licensed under the MIT license. - ''' - - for remote in self.remotes: - if remote.name == remote_name: - remote.fetch() - remote_master_id = self.lookup_reference( - 'refs/remotes/origin/%s' % branch).target - - if force: - repo_branch = self.lookup_reference( - 'refs/heads/%s' % branch) - repo_branch.set_target(remote_master_id) - - merge_result, _ = self.merge_analysis(remote_master_id) - # Up to date, do nothing - if merge_result & pygit2.GIT_MERGE_ANALYSIS_UP_TO_DATE: - return - # We can just fastforward - elif merge_result & pygit2.GIT_MERGE_ANALYSIS_FASTFORWARD: - self.checkout_tree(self.get(remote_master_id)) - master_ref = self.lookup_reference( - 'refs/heads/%s' % branch) - master_ref.set_target(remote_master_id) - self.head.set_target(remote_master_id) - elif merge_result & pygit2.GIT_MERGE_ANALYSIS_NORMAL: - sys.exit('Pulling remote changes leads to a conflict') - else: - print 'Unexpected merge result: %s' % ( - pygit2.GIT_MERGE_ANALYSIS_NORMAL) - raise AssertionError('Unknown merge analysis result') From 4e89d97a8c552835d4d53c76773f8dd517029d81 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 2/13] Upgrade version of pygit2 supported Signed-off-by: Clement Verna --- diff --git a/requirements.txt b/requirements.txt index 9723285..826f14a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ PyGithub click python-fedora -pygit2 >= 0.20.1 +pygit2 >= 0.22 werkzeug requests From 9767fa83c0887245d0c092014bc4929c3e0f22c8 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 3/13] Modified setup.py for python3 Signed-off-by: Clement Verna --- diff --git a/setup.py b/setup.py index 52ec81c..9b860e7 100644 --- a/setup.py +++ b/setup.py @@ -26,8 +26,7 @@ setup( 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3 :: Only', ], license='GNU General Public License v2.0', @@ -38,4 +37,5 @@ setup( }, include_package_data=True, install_requires=read('requirements.txt'), + zip_safe=False, ) From 88e6ce9d88962fec5dcf5b21177cfb1f450df97e Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 4/13] Encode attachment to uft-8 Signed-off-by: Clement Verna --- diff --git a/pagure_importer/utils/git.py b/pagure_importer/utils/git.py index cf4f388..6884178 100644 --- a/pagure_importer/utils/git.py +++ b/pagure_importer/utils/git.py @@ -14,8 +14,8 @@ import werkzeug def get_secure_filename(attachment, filename): ''' Hashes the file name, same as pagure ''' - - filename = '%s-%s' % (hashlib.sha256(str(attachment)).hexdigest(), + attach = str(attachment).encode('utf-8') + filename = '%s-%s' % (hashlib.sha256(attach).hexdigest(), werkzeug.secure_filename(str(filename))) return filename From 4cc31565be2d0accc3edea81c6a2175f7e49e000 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 5/13] Adding python3 configparser Signed-off-by: Clement Verna --- diff --git a/pagure_importer/utils/__init__.py b/pagure_importer/utils/__init__.py index 9dcdad4..ac5fb9c 100644 --- a/pagure_importer/utils/__init__.py +++ b/pagure_importer/utils/__init__.py @@ -3,7 +3,7 @@ import os import requests import json import click -import ConfigParser +import configparser from github import Github from github.GithubException import TwoFactorException @@ -35,7 +35,7 @@ def get_auth_token(github): cfg_path = os.path.join(os.environ.get('HOME'), '.pgimport') if os.path.exists(cfg_path): - parser = ConfigParser.RawConfigParser() + parser = configparser.ConfigParser.RawConfigParser() parser.read(cfg_path) otp_auth = parser.get('github', 'auth_token') else: From f8c982be2e667516883a7e341261848acdb3287b Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 6/13] Adding spec file for py3 rpm Signed-off-by: Clement Verna --- diff --git a/pagure-importer.spec b/pagure-importer.spec new file mode 100644 index 0000000..5f8636b --- /dev/null +++ b/pagure-importer.spec @@ -0,0 +1,90 @@ +%global modname pgimport +%global sum Command line issues importer to pagure . + +Name: pagure-importer +Version: 2.0 +Release: 1%{?dist} +Summary: %{sum} + +License: GPLv2 +URL: https://pagure.io/pagure-importer +Source0: https://pagure.io/releases/pagure-importer/pgimport-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-github +BuildRequires: python3-pygit2 +BuildRequires: python3-fedora +BuildRequires: python3-click +BuildRequires: python3-werkzeug + +Requires: python3-github +Requires: python3-pygit2 +Requires: python3-fedora +Requires: python3-click +Requires: python3-werkzeug +Requires: git-core + +%description +pagure-importer is a command line tool to make easy the migration of issues from github +and fedorahosted to pagure + +%package -n python3-%{modname} +Summary: %{sum} +%{?python_provide:%python_provide python3-%{modname}} + +%description -n python3-%{modname} +pagure-importer is a command line tool to make easy the migration of issues from github +and fedorahosted to pagure + +%prep +%autosetup -n %{modname}-%{version} + +rm -rf %{modname}.egg-info + + +%build +%py3_build + +%install +%py3_install + + +%files -n python3-%{modname} +%license LICENSE +%doc README.md +%{python3_sitelib}/* +%{_bindir}/pgimport + + +%changelog +* Mon Nov 14 2016 Clement Verna - 1.2.3 +- need to install RPMs as root form copr, so use sudo +- separate milestone and tags, better tags pre-processing +- custom fields for fedorahosted tickets +- Fix #68 'list' object has no attribute 'username' on pgimport github +- Get more than one attachment per comment +- Add Documentation to turn off Fedmsg hook and code refactor +- Strip trailling / +* Sun Oct 23 2016 Clement Verna - 1.2.2 +- Add flag for pagure project which already have issues +- Add support for close status +- Try to get trac project milestone if exist, if not just carry on +- pagure now has 'Closed' instead of 'Fixed' +* Sat Oct 08 2016 Clement Verna - 1.2.1 +- Some make up in our code +- Milestone support for github importer +- Let click handle the stdout +- Add two-factor authentication to Github importer +- Added tag to import all issues as private by default +- include enabling pagure tickets plugin instructions where all commands are placed to double sure +- tags command improvement +* Tue Sep 06 2016 Clement Verna - 1.2.0 +- Reduce number of opened file by cloning and deleting only once the working repo +- Improve usage example documentation +- Change protocol used to get data from fedorahosted from XML-RPC to JSON-RPC + +* Thu Aug 11 2016 Clement Verna - 1.1.0 +- initial package for Fedora From 057419d78b806af9481c45471f2783273e69bf48 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 7/13] Fixing the py3 configparser and some cleanup Signed-off-by: Clement Verna --- diff --git a/MANIFEST.in b/MANIFEST.in index f13e221..d5a775c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -include README.md requirements.txt +include README.md requirements.txt LICENSE recursive-include pagure_importer * diff --git a/pagure_importer/utils/__init__.py b/pagure_importer/utils/__init__.py index ac5fb9c..b6d67ae 100644 --- a/pagure_importer/utils/__init__.py +++ b/pagure_importer/utils/__init__.py @@ -3,7 +3,7 @@ import os import requests import json import click -import configparser +from configparser import ConfigParser from github import Github from github.GithubException import TwoFactorException @@ -35,9 +35,9 @@ def get_auth_token(github): cfg_path = os.path.join(os.environ.get('HOME'), '.pgimport') if os.path.exists(cfg_path): - parser = configparser.ConfigParser.RawConfigParser() + parser = ConfigParser() parser.read(cfg_path) - otp_auth = parser.get('github', 'auth_token') + otp_auth = parser['github']['auth_token'] else: otp_auth = create_auth_token(github) otp_auth = otp_auth.token @@ -91,8 +91,7 @@ def gh_get_contributors(github_username, github_password, github_project_name): 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 = { From ca1508a1fedb7ec3e6cd5f47c4c8fdb36906c8ac Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 8/13] Updated get contributors to use the python api Signed-off-by: Clement Verna --- diff --git a/pagure_importer/utils/__init__.py b/pagure_importer/utils/__init__.py index b6d67ae..20da4cd 100644 --- a/pagure_importer/utils/__init__.py +++ b/pagure_importer/utils/__init__.py @@ -70,45 +70,15 @@ def gh_get_contributors(github_username, github_password, github_project_name): otp_auth = get_auth_token(github_obj) github_obj = Github(otp_auth) project = github_obj.get_repo(github_project_name) - commits_url = project.commits_url.replace('{/sha}', '') - - page = 0 + project_commits = project.get_commits() contributors = [] - while True: - page += 1 - payload = {'page': page} - data_ = json.loads(requests.get( - commits_url, params=payload, - auth=HTTPBasicAuth(github_username, github_password)).text) - - if not data_: - break - - for data in data_: - try: - contributor = data['commit']['committer'] - contributor_email = contributor['email'] - 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') - continue - - json_data = { - 'name': contributor_name, - 'fullname': contributor_fullname, - 'emails': [contributor_email] - } - - present = False - for i in contributors: - if i == json_data: - present = True - break - - if not present: - click.echo('contributor added: ' + contributor_name) - contributors.append(json_data) + for commit in project_commits: + contributor= {'fullname': commit.author.name, + 'email': commit.author.email, + 'name': commit.author.login} + if not contributor in contributors: + contributors.append(contributor) + click.echo('contributor added: ' + contributor['name']) with open('contributors.json', 'w') as f: f.write(json.dumps(contributors)) From aad15c9d885aed8b7865fea09e0ec6c490fd5b5e Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 9/13] Move spec file to rpm folder Signed-off-by: Clement Verna --- diff --git a/pagure-importer.spec b/pagure-importer.spec deleted file mode 100644 index 5f8636b..0000000 --- a/pagure-importer.spec +++ /dev/null @@ -1,90 +0,0 @@ -%global modname pgimport -%global sum Command line issues importer to pagure . - -Name: pagure-importer -Version: 2.0 -Release: 1%{?dist} -Summary: %{sum} - -License: GPLv2 -URL: https://pagure.io/pagure-importer -Source0: https://pagure.io/releases/pagure-importer/pgimport-%{version}.tar.gz - -BuildArch: noarch - -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-github -BuildRequires: python3-pygit2 -BuildRequires: python3-fedora -BuildRequires: python3-click -BuildRequires: python3-werkzeug - -Requires: python3-github -Requires: python3-pygit2 -Requires: python3-fedora -Requires: python3-click -Requires: python3-werkzeug -Requires: git-core - -%description -pagure-importer is a command line tool to make easy the migration of issues from github -and fedorahosted to pagure - -%package -n python3-%{modname} -Summary: %{sum} -%{?python_provide:%python_provide python3-%{modname}} - -%description -n python3-%{modname} -pagure-importer is a command line tool to make easy the migration of issues from github -and fedorahosted to pagure - -%prep -%autosetup -n %{modname}-%{version} - -rm -rf %{modname}.egg-info - - -%build -%py3_build - -%install -%py3_install - - -%files -n python3-%{modname} -%license LICENSE -%doc README.md -%{python3_sitelib}/* -%{_bindir}/pgimport - - -%changelog -* Mon Nov 14 2016 Clement Verna - 1.2.3 -- need to install RPMs as root form copr, so use sudo -- separate milestone and tags, better tags pre-processing -- custom fields for fedorahosted tickets -- Fix #68 'list' object has no attribute 'username' on pgimport github -- Get more than one attachment per comment -- Add Documentation to turn off Fedmsg hook and code refactor -- Strip trailling / -* Sun Oct 23 2016 Clement Verna - 1.2.2 -- Add flag for pagure project which already have issues -- Add support for close status -- Try to get trac project milestone if exist, if not just carry on -- pagure now has 'Closed' instead of 'Fixed' -* Sat Oct 08 2016 Clement Verna - 1.2.1 -- Some make up in our code -- Milestone support for github importer -- Let click handle the stdout -- Add two-factor authentication to Github importer -- Added tag to import all issues as private by default -- include enabling pagure tickets plugin instructions where all commands are placed to double sure -- tags command improvement -* Tue Sep 06 2016 Clement Verna - 1.2.0 -- Reduce number of opened file by cloning and deleting only once the working repo -- Improve usage example documentation -- Change protocol used to get data from fedorahosted from XML-RPC to JSON-RPC - -* Thu Aug 11 2016 Clement Verna - 1.1.0 -- initial package for Fedora diff --git a/rpm/pagure-importer.spec b/rpm/pagure-importer.spec new file mode 100644 index 0000000..5f8636b --- /dev/null +++ b/rpm/pagure-importer.spec @@ -0,0 +1,90 @@ +%global modname pgimport +%global sum Command line issues importer to pagure . + +Name: pagure-importer +Version: 2.0 +Release: 1%{?dist} +Summary: %{sum} + +License: GPLv2 +URL: https://pagure.io/pagure-importer +Source0: https://pagure.io/releases/pagure-importer/pgimport-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-github +BuildRequires: python3-pygit2 +BuildRequires: python3-fedora +BuildRequires: python3-click +BuildRequires: python3-werkzeug + +Requires: python3-github +Requires: python3-pygit2 +Requires: python3-fedora +Requires: python3-click +Requires: python3-werkzeug +Requires: git-core + +%description +pagure-importer is a command line tool to make easy the migration of issues from github +and fedorahosted to pagure + +%package -n python3-%{modname} +Summary: %{sum} +%{?python_provide:%python_provide python3-%{modname}} + +%description -n python3-%{modname} +pagure-importer is a command line tool to make easy the migration of issues from github +and fedorahosted to pagure + +%prep +%autosetup -n %{modname}-%{version} + +rm -rf %{modname}.egg-info + + +%build +%py3_build + +%install +%py3_install + + +%files -n python3-%{modname} +%license LICENSE +%doc README.md +%{python3_sitelib}/* +%{_bindir}/pgimport + + +%changelog +* Mon Nov 14 2016 Clement Verna - 1.2.3 +- need to install RPMs as root form copr, so use sudo +- separate milestone and tags, better tags pre-processing +- custom fields for fedorahosted tickets +- Fix #68 'list' object has no attribute 'username' on pgimport github +- Get more than one attachment per comment +- Add Documentation to turn off Fedmsg hook and code refactor +- Strip trailling / +* Sun Oct 23 2016 Clement Verna - 1.2.2 +- Add flag for pagure project which already have issues +- Add support for close status +- Try to get trac project milestone if exist, if not just carry on +- pagure now has 'Closed' instead of 'Fixed' +* Sat Oct 08 2016 Clement Verna - 1.2.1 +- Some make up in our code +- Milestone support for github importer +- Let click handle the stdout +- Add two-factor authentication to Github importer +- Added tag to import all issues as private by default +- include enabling pagure tickets plugin instructions where all commands are placed to double sure +- tags command improvement +* Tue Sep 06 2016 Clement Verna - 1.2.0 +- Reduce number of opened file by cloning and deleting only once the working repo +- Improve usage example documentation +- Change protocol used to get data from fedorahosted from XML-RPC to JSON-RPC + +* Thu Aug 11 2016 Clement Verna - 1.1.0 +- initial package for Fedora From 86c635cdd985570f966ad93ce4cecef7b1af0ab5 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 10/13] Use github get_contributors API Signed-off-by: Clement Verna --- diff --git a/pagure_importer/utils/__init__.py b/pagure_importer/utils/__init__.py index 20da4cd..bd05e0e 100644 --- a/pagure_importer/utils/__init__.py +++ b/pagure_importer/utils/__init__.py @@ -70,13 +70,13 @@ def gh_get_contributors(github_username, github_password, github_project_name): otp_auth = get_auth_token(github_obj) github_obj = Github(otp_auth) project = github_obj.get_repo(github_project_name) - project_commits = project.get_commits() + project_contributors = project.get_contributors() contributors = [] - for commit in project_commits: - contributor= {'fullname': commit.author.name, - 'email': commit.author.email, - 'name': commit.author.login} - if not contributor in contributors: + for user in project_contributors: + contributor = {'fullname': user.name, + 'email': user.email, + 'name': user.login} + if contributor not in contributors: contributors.append(contributor) click.echo('contributor added: ' + contributor['name']) From 0867b29dd5b0bd7daf04791c49e9d4ce12f8846f Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 11/13] Fixing generation of csv file Signed-off-by: Clement Verna --- diff --git a/pagure_importer/utils/__init__.py b/pagure_importer/utils/__init__.py index bd05e0e..bfa4d88 100644 --- a/pagure_importer/utils/__init__.py +++ b/pagure_importer/utils/__init__.py @@ -134,16 +134,15 @@ def gh_assemble_users(): found = False for j in contributors: if j.get('name', None) == i: - j['emails'] = j.get('emails')[0] names.append(j) found = True if not found: - d = {'name': i, 'fullname': None, 'emails': None} + d = {'name': i, 'fullname': None, 'email': None} names.append(d) with open('assembled_users.csv', 'w') as ac: - field_names = ['name', 'fullname', 'emails'] + field_names = ['name', 'fullname', 'email'] writer = csv.DictWriter(ac, fieldnames=field_names) writer.writeheader() From ceaf73babb0cde8ab7c4f45eb18de568971d0fd1 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 19 2016 20:23:09 +0000 Subject: [PATCH 12/13] Find the email address in the git commit and not the github commit Signed-off-by: Clement Verna --- diff --git a/pagure_importer/utils/__init__.py b/pagure_importer/utils/__init__.py index bfa4d88..ee0d085 100644 --- a/pagure_importer/utils/__init__.py +++ b/pagure_importer/utils/__init__.py @@ -1,14 +1,10 @@ import csv import os -import requests import json import click from configparser import ConfigParser from github import Github from github.GithubException import TwoFactorException - -from requests.auth import HTTPBasicAuth - from pagure_importer.utils.exceptions import FileNotFound, EmailNotFound from pagure_importer.app import REPO_PATH @@ -70,12 +66,12 @@ def gh_get_contributors(github_username, github_password, github_project_name): otp_auth = get_auth_token(github_obj) github_obj = Github(otp_auth) project = github_obj.get_repo(github_project_name) - project_contributors = project.get_contributors() + project_commits = project.get_commits() contributors = [] - for user in project_contributors: - contributor = {'fullname': user.name, - 'email': user.email, - 'name': user.login} + for commit in project_commits: + contributor = {'fullname': commit.author.name, + 'emails': commit.commit.author.email, + 'name': commit.author.login} if contributor not in contributors: contributors.append(contributor) click.echo('contributor added: ' + contributor['name']) @@ -138,11 +134,11 @@ def gh_assemble_users(): found = True if not found: - d = {'name': i, 'fullname': None, 'email': None} + d = {'name': i, 'fullname': None, 'emails': None} names.append(d) with open('assembled_users.csv', 'w') as ac: - field_names = ['name', 'fullname', 'email'] + field_names = ['name', 'fullname', 'emails'] writer = csv.DictWriter(ac, fieldnames=field_names) writer.writeheader() From 7844c8d4db442bdc618ff7a0f3065cd3e2aa166f Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Nov 26 2016 21:29:27 +0000 Subject: [PATCH 13/13] Remove Spec file form repo Signed-off-by: Clement Verna --- diff --git a/rpm/pagure-importer.spec b/rpm/pagure-importer.spec deleted file mode 100644 index 5f8636b..0000000 --- a/rpm/pagure-importer.spec +++ /dev/null @@ -1,90 +0,0 @@ -%global modname pgimport -%global sum Command line issues importer to pagure . - -Name: pagure-importer -Version: 2.0 -Release: 1%{?dist} -Summary: %{sum} - -License: GPLv2 -URL: https://pagure.io/pagure-importer -Source0: https://pagure.io/releases/pagure-importer/pgimport-%{version}.tar.gz - -BuildArch: noarch - -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-github -BuildRequires: python3-pygit2 -BuildRequires: python3-fedora -BuildRequires: python3-click -BuildRequires: python3-werkzeug - -Requires: python3-github -Requires: python3-pygit2 -Requires: python3-fedora -Requires: python3-click -Requires: python3-werkzeug -Requires: git-core - -%description -pagure-importer is a command line tool to make easy the migration of issues from github -and fedorahosted to pagure - -%package -n python3-%{modname} -Summary: %{sum} -%{?python_provide:%python_provide python3-%{modname}} - -%description -n python3-%{modname} -pagure-importer is a command line tool to make easy the migration of issues from github -and fedorahosted to pagure - -%prep -%autosetup -n %{modname}-%{version} - -rm -rf %{modname}.egg-info - - -%build -%py3_build - -%install -%py3_install - - -%files -n python3-%{modname} -%license LICENSE -%doc README.md -%{python3_sitelib}/* -%{_bindir}/pgimport - - -%changelog -* Mon Nov 14 2016 Clement Verna - 1.2.3 -- need to install RPMs as root form copr, so use sudo -- separate milestone and tags, better tags pre-processing -- custom fields for fedorahosted tickets -- Fix #68 'list' object has no attribute 'username' on pgimport github -- Get more than one attachment per comment -- Add Documentation to turn off Fedmsg hook and code refactor -- Strip trailling / -* Sun Oct 23 2016 Clement Verna - 1.2.2 -- Add flag for pagure project which already have issues -- Add support for close status -- Try to get trac project milestone if exist, if not just carry on -- pagure now has 'Closed' instead of 'Fixed' -* Sat Oct 08 2016 Clement Verna - 1.2.1 -- Some make up in our code -- Milestone support for github importer -- Let click handle the stdout -- Add two-factor authentication to Github importer -- Added tag to import all issues as private by default -- include enabling pagure tickets plugin instructions where all commands are placed to double sure -- tags command improvement -* Tue Sep 06 2016 Clement Verna - 1.2.0 -- Reduce number of opened file by cloning and deleting only once the working repo -- Improve usage example documentation -- Change protocol used to get data from fedorahosted from XML-RPC to JSON-RPC - -* Thu Aug 11 2016 Clement Verna - 1.1.0 -- initial package for Fedora