Commits (2)
......@@ -118,12 +118,12 @@ def initial_comment_to_issue_description(bug, text, user_cache):
# Assignment of $PROJECT@gnome.bugs effectively means unassigned
assigned_to = ""
if not bug.assigned_to.endswith("gnome.bugs"):
assigned_to = "**Assigned to {}** \n".format(id_to_name(bug.assigned_to, user_cache))
assigned_to = "Assigned to **{}** \n".format(id_to_name(bug.assigned_to, user_cache))
return DESC_TEMPLATE.format(submitter=id_to_name(bug.creator, user_cache),
assigned_to=assigned_to,
id=bug.id,
body=body_to_markdown_quote(text))
body=autolink_markdown(text.encode('utf-8')))
def bugzilla_migration_closing_comment (gl_issue):
return MIGR_TEMPLATE.format(gl_issue.web_url)
......@@ -260,7 +260,7 @@ def processbug (bgo, target, bzbug):
user_cache = populate_user_cache (bgo, target, user_cache)
summary = "[BZ#{}] {}".format(bzbug.id, bzbug.summary.encode('utf-8'))
summary = bzbug.summary.encode('utf-8')
description = initial_comment_to_issue_description (bzbug, desctext, user_cache)
issue = target.create_issue (bzbug.id, summary, description, str(bzbug.creation_time))
......@@ -291,6 +291,16 @@ def processbug (bgo, target, bzbug):
'created_at': str(comment['creation_time'])
})
# GJS-specific heuristics
if bzbug.severity == 'enhancement':
issue.labels += ['1. Feature']
elif bzbug.severity in ('major', 'critical', 'blocker'):
issue.labels += ['1. Bug']
if bzbug.status == 'NEEDINFO':
issue.labels += ['2. Needs Information']
if bzbug.component == 'documentation':
issue.labels += ['8. Developer Docs']
issue.save()
print("New GitLab issue created from bugzilla bug {}: {}".format(bzbug.id, issue.web_url))
......