Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Retain comment-matching compatibility with how earlier versions of mi…

…grateissues.py formatted comment bodies.
  • Loading branch information...
commit 9291ca85d7e932f3132349334b6cdf40befff5ad 1 parent db9b0c5
@joelpt joelpt authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 migrateissues.py
View
6 migrateissues.py
@@ -76,7 +76,7 @@ def parse_gcode_id(id_text):
def parse_gcode_date(date_text):
- """ Transforms a Google Code date into """
+ """ Transforms a Google Code date into a more human readable string. """
parsed = datetime.strptime(date_text, "%Y-%m-%dT%H:%M:%S.000Z")
return parsed.strftime("%B %d, %Y %H:%M:%S")
@@ -190,6 +190,10 @@ def add_comments_to_issue(github_issue, gid):
existing_comments = [ comment.body for comment in github_issue.get_comments() ]
+ # Retain compatibility with earlier versions of migrateissues.py
+
+ existing_comments = [ re.sub(r'^(.+):_\n', r'\1_\n', body) for body in existing_comments ]
+
# Retrieve comments in blocks of GOOGLE_MAX_RESULTS until there are none left
while True:
Please sign in to comment.
Something went wrong with that request. Please try again.