mikemccand commented on code in PR #57:
URL: https://github.com/apache/lucene-jira-archive/pull/57#discussion_r926614459


##########
migration/src/jira2github_import.py:
##########
@@ -123,6 +123,17 @@ def comment_author(author_name, author_dispname):
             author_gh = account_map.get(author_name)
             return f"{author_dispname} (@{author_gh})" if author_gh else 
author_dispname
         
+        def enable_hyperlink_to_commit(comment_body: str):
+            lines = []
+            for line in comment_body.split("\n"):
+                # remove '[' and ']' iff it contains a URL (i.e. link to a 
commit in ASF GitBox repo).
+                m = re.match(r"^\[\s?(https?://\S+)\s?\]$", line.strip())

Review Comment:
   Maybe `\s*` instead of `\s?` after the opening `[` and before the closing 
`]` for better robustness?   Or are we sure it's always exactly 0 or 1 space?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to