Commit 66d30e4e authored by Romain Bouvier's avatar Romain Bouvier
Browse files

Add possibility to import resolved bugs too

- By using the --resolved switch
- Importing tens of thousands bugs is really slow, I think that's why gnome and fd.o chose to not import resolved bugs.
- However on xfce, it should be doable (only ~15k bugs in total)
parent e0914f34
......@@ -311,7 +311,12 @@ def processbug(bgo, bzurl, instance, resolution, target, user_cache,
# Workaround python-gitlab bug by providing redundant state_event
if bzbug.status.startswith('RESOLVED'):
print("Closing the issue in gitlab as it is marked as resolved in bugzilla")
issue.state_event = 'close'
print("New GitLab issue created from bugzilla bug "
"{}: {}".format(, issue.web_url))
......@@ -355,6 +360,8 @@ def options():
help="import for rather than GNOME")
parser.add_argument('--xfce', action='store_true',
help="import for rather than GNOME")
parser.add_argument('--resolved', action='store_true',
help="import resolved bugs (default: no)")
return parser.parse_args()
......@@ -436,6 +443,9 @@ def main():
print("Querying for open bugs for the '%s' product, all components" %
if args.resolved:
print('We are also importing resolved issues')
query["status"] += " RESOLVED".split()
bzbugs = bgo.query(query)
print("{} bugs found".format(len(bzbugs)))
count = 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment