From 3b007565a82e770e0452ee1c9913a0ace91923f6 Mon Sep 17 00:00:00 2001 From: Vivek Anand Date: Sep 08 2016 21:07:54 +0000 Subject: [PATCH 1/2] split the tags when ',' in them, put them in lower case --- diff --git a/pagure_importer/utils/importer_trac.py b/pagure_importer/utils/importer_trac.py index 78322ff..2249cdd 100644 --- a/pagure_importer/utils/importer_trac.py +++ b/pagure_importer/utils/importer_trac.py @@ -118,6 +118,9 @@ class TracImporter(): if trac_ticket['milestone'] != '': pagure_issue_tags.append(str(trac_ticket['milestone'])) + # Remove ',' between the tags and convert all tags to lower case + pagure_issue_tags = list(set([j for k in [i.lower().split(',') + for i in pagure_issue_tags] for j in k])) pagure_issue_depends = [] pagure_issue_blocks = [] pagure_issue_is_private = False From 62af4808ba3bf767da08d0d28c6096bff7403b55 Mon Sep 17 00:00:00 2001 From: Vivek Anand Date: Sep 08 2016 21:08:03 +0000 Subject: [PATCH 2/2] change the command to include --tags in readme People will generally like to import the tags and they might miss it. --- diff --git a/README.md b/README.md index 2b3e202..2555119 100644 --- a/README.md +++ b/README.md @@ -40,18 +40,18 @@ CLI tool for importing issues etc. from different sources like github to pagure This will clone the pagure foobar repository into the default set /tmp directory as /tmp/foobar.git 2) The fedorahosted command can be used to import issues from a fedorahosted project to pagure - + $ pgimport fedorahosted --help Usage: pgimport fedorahosted [OPTIONS] PROJECT_URL Options: - --tags Import pagure tags: + --tags Import pagure tags as well. --help Show this message and exit. - $ pgimport fedorahosted https://fedorahosted.org/foobar + $ pgimport fedorahosted https://fedorahosted.org/foobar --tags - This command will import all the tickets information to /tmp/foobar.git repository + This command will import all the tickets information with all tags to /tmp/foobar.git repository 3) The push command can be used to push a clone pagure ticket repo back to pagure.